video: Fixed remaining return 0 to use NULL in CreateDevice implementations.
This commit is contained in:
@@ -62,7 +62,7 @@ static SDL_VideoDevice *Emscripten_CreateDevice(void)
|
|||||||
/* Initialize all variables that we clean on shutdown */
|
/* Initialize all variables that we clean on shutdown */
|
||||||
device = (SDL_VideoDevice *)SDL_calloc(1, sizeof(SDL_VideoDevice));
|
device = (SDL_VideoDevice *)SDL_calloc(1, sizeof(SDL_VideoDevice));
|
||||||
if (!device) {
|
if (!device) {
|
||||||
return 0;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Firefox sends blur event which would otherwise prevent full screen
|
/* Firefox sends blur event which would otherwise prevent full screen
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ static SDL_VideoDevice *N3DS_CreateDevice(void)
|
|||||||
/* Initialize all variables that we clean on shutdown */
|
/* Initialize all variables that we clean on shutdown */
|
||||||
device = (SDL_VideoDevice *)SDL_calloc(1, sizeof(SDL_VideoDevice));
|
device = (SDL_VideoDevice *)SDL_calloc(1, sizeof(SDL_VideoDevice));
|
||||||
if (!device) {
|
if (!device) {
|
||||||
return 0;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Initialize internal data */
|
/* Initialize internal data */
|
||||||
|
|||||||
@@ -105,14 +105,14 @@ static SDL_VideoDevice *NGAGE_CreateDevice(void)
|
|||||||
/* Initialize all variables that we clean on shutdown */
|
/* Initialize all variables that we clean on shutdown */
|
||||||
device = (SDL_VideoDevice *)SDL_calloc(1, sizeof(SDL_VideoDevice));
|
device = (SDL_VideoDevice *)SDL_calloc(1, sizeof(SDL_VideoDevice));
|
||||||
if (!device) {
|
if (!device) {
|
||||||
return 0;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Initialize internal N-Gage specific data */
|
/* Initialize internal N-Gage specific data */
|
||||||
phdata = (SDL_VideoData *)SDL_calloc(1, sizeof(SDL_VideoData));
|
phdata = (SDL_VideoData *)SDL_calloc(1, sizeof(SDL_VideoData));
|
||||||
if (!phdata) {
|
if (!phdata) {
|
||||||
SDL_free(device);
|
SDL_free(device);
|
||||||
return 0;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* General video */
|
/* General video */
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ static SDL_VideoDevice *PS2_CreateDevice(void)
|
|||||||
/* Initialize all variables that we clean on shutdown */
|
/* Initialize all variables that we clean on shutdown */
|
||||||
device = (SDL_VideoDevice *)SDL_calloc(1, sizeof(SDL_VideoDevice));
|
device = (SDL_VideoDevice *)SDL_calloc(1, sizeof(SDL_VideoDevice));
|
||||||
if (!device) {
|
if (!device) {
|
||||||
return 0;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Set the function pointers */
|
/* Set the function pointers */
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ static SDL_VideoDevice *RISCOS_CreateDevice(void)
|
|||||||
/* Initialize all variables that we clean on shutdown */
|
/* Initialize all variables that we clean on shutdown */
|
||||||
device = (SDL_VideoDevice *)SDL_calloc(1, sizeof(SDL_VideoDevice));
|
device = (SDL_VideoDevice *)SDL_calloc(1, sizeof(SDL_VideoDevice));
|
||||||
if (!device) {
|
if (!device) {
|
||||||
return 0;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Initialize internal data */
|
/* Initialize internal data */
|
||||||
|
|||||||
@@ -108,13 +108,13 @@ static SDL_VideoDevice *WINRT_CreateDevice(void)
|
|||||||
/* Initialize all variables that we clean on shutdown */
|
/* Initialize all variables that we clean on shutdown */
|
||||||
device = (SDL_VideoDevice *)SDL_calloc(1, sizeof(SDL_VideoDevice));
|
device = (SDL_VideoDevice *)SDL_calloc(1, sizeof(SDL_VideoDevice));
|
||||||
if (!device) {
|
if (!device) {
|
||||||
return 0;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
data = (SDL_VideoData *)SDL_calloc(1, sizeof(SDL_VideoData));
|
data = (SDL_VideoData *)SDL_calloc(1, sizeof(SDL_VideoData));
|
||||||
if (!data) {
|
if (!data) {
|
||||||
SDL_free(device);
|
SDL_free(device);
|
||||||
return 0;
|
return NULL;
|
||||||
}
|
}
|
||||||
device->driverdata = data;
|
device->driverdata = data;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user