video: removed unused devindex argument from bootstrap's create method.

This commit is contained in:
Ryan C. Gordon 2022-07-25 23:06:58 -04:00
parent cbb3f4ca37
commit 20a76b0e3e
No known key found for this signature in database
GPG Key ID: FA148B892AB48044
19 changed files with 27 additions and 28 deletions

View File

@ -432,7 +432,7 @@ typedef struct VideoBootStrap
{ {
const char *name; const char *name;
const char *desc; const char *desc;
SDL_VideoDevice *(*create) (int devindex); SDL_VideoDevice *(*create) (void);
} VideoBootStrap; } VideoBootStrap;
/* Not all of these are available in a given build. Use #ifdefs, etc. */ /* Not all of these are available in a given build. Use #ifdefs, etc. */

View File

@ -391,12 +391,11 @@ int
SDL_VideoInit(const char *driver_name) SDL_VideoInit(const char *driver_name)
{ {
SDL_VideoDevice *video; SDL_VideoDevice *video;
int index;
int i;
SDL_bool init_events = SDL_FALSE; SDL_bool init_events = SDL_FALSE;
SDL_bool init_keyboard = SDL_FALSE; SDL_bool init_keyboard = SDL_FALSE;
SDL_bool init_mouse = SDL_FALSE; SDL_bool init_mouse = SDL_FALSE;
SDL_bool init_touch = SDL_FALSE; SDL_bool init_touch = SDL_FALSE;
int i;
/* Check to make sure we don't overwrite '_this' */ /* Check to make sure we don't overwrite '_this' */
if (_this != NULL) { if (_this != NULL) {
@ -426,7 +425,6 @@ SDL_VideoInit(const char *driver_name)
init_touch = SDL_TRUE; init_touch = SDL_TRUE;
/* Select the proper video driver */ /* Select the proper video driver */
i = index = 0;
video = NULL; video = NULL;
if (driver_name == NULL) { if (driver_name == NULL) {
driver_name = SDL_GetHint(SDL_HINT_VIDEODRIVER); driver_name = SDL_GetHint(SDL_HINT_VIDEODRIVER);
@ -441,7 +439,7 @@ SDL_VideoInit(const char *driver_name)
for (i = 0; bootstrap[i]; ++i) { for (i = 0; bootstrap[i]; ++i) {
if ((driver_attempt_len == SDL_strlen(bootstrap[i]->name)) && if ((driver_attempt_len == SDL_strlen(bootstrap[i]->name)) &&
(SDL_strncasecmp(bootstrap[i]->name, driver_attempt, driver_attempt_len) == 0)) { (SDL_strncasecmp(bootstrap[i]->name, driver_attempt, driver_attempt_len) == 0)) {
video = bootstrap[i]->create(index); video = bootstrap[i]->create();
break; break;
} }
} }
@ -450,7 +448,7 @@ SDL_VideoInit(const char *driver_name)
} }
} else { } else {
for (i = 0; bootstrap[i]; ++i) { for (i = 0; bootstrap[i]; ++i) {
video = bootstrap[i]->create(index); video = bootstrap[i]->create();
if (video != NULL) { if (video != NULL) {
break; break;
} }

View File

@ -84,7 +84,7 @@ Android_DeleteDevice(SDL_VideoDevice *device)
} }
static SDL_VideoDevice * static SDL_VideoDevice *
Android_CreateDevice(int devindex) Android_CreateDevice(void)
{ {
SDL_VideoDevice *device; SDL_VideoDevice *device;
SDL_VideoData *data; SDL_VideoData *data;

View File

@ -55,7 +55,7 @@ Cocoa_DeleteDevice(SDL_VideoDevice * device)
}} }}
static SDL_VideoDevice * static SDL_VideoDevice *
Cocoa_CreateDevice(int devindex) Cocoa_CreateDevice(void)
{ @autoreleasepool { @autoreleasepool
{ {
SDL_VideoDevice *device; SDL_VideoDevice *device;

View File

@ -61,7 +61,7 @@
static int DirectFB_VideoInit(_THIS); static int DirectFB_VideoInit(_THIS);
static void DirectFB_VideoQuit(_THIS); static void DirectFB_VideoQuit(_THIS);
static SDL_VideoDevice *DirectFB_CreateDevice(int devindex); static SDL_VideoDevice *DirectFB_CreateDevice(void);
VideoBootStrap DirectFB_bootstrap = { VideoBootStrap DirectFB_bootstrap = {
"directfb", "DirectFB", "directfb", "DirectFB",
@ -83,7 +83,7 @@ DirectFB_DeleteDevice(SDL_VideoDevice * device)
} }
static SDL_VideoDevice * static SDL_VideoDevice *
DirectFB_CreateDevice(int devindex) DirectFB_CreateDevice(void)
{ {
SDL_VideoDevice *device; SDL_VideoDevice *device;

View File

@ -75,7 +75,7 @@ DUMMY_DeleteDevice(SDL_VideoDevice * device)
} }
static SDL_VideoDevice * static SDL_VideoDevice *
DUMMY_CreateDevice(int devindex) DUMMY_CreateDevice(void)
{ {
SDL_VideoDevice *device; SDL_VideoDevice *device;

View File

@ -62,7 +62,7 @@ Emscripten_DeleteDevice(SDL_VideoDevice * device)
} }
static SDL_VideoDevice * static SDL_VideoDevice *
Emscripten_CreateDevice(int devindex) Emscripten_CreateDevice(void)
{ {
SDL_VideoDevice *device; SDL_VideoDevice *device;

View File

@ -55,7 +55,7 @@ static SDL_INLINE SDL_BWin *_ToBeWin(SDL_Window *window) {
/* End undefined functions */ /* End undefined functions */
static SDL_VideoDevice * static SDL_VideoDevice *
HAIKU_CreateDevice(int devindex) HAIKU_CreateDevice(void)
{ {
SDL_VideoDevice *device; SDL_VideoDevice *device;
/*SDL_VideoData *data;*/ /*SDL_VideoData *data;*/

View File

@ -213,10 +213,11 @@ KMSDRM_DeleteDevice(SDL_VideoDevice * device)
} }
static SDL_VideoDevice * static SDL_VideoDevice *
KMSDRM_CreateDevice(int devindex) KMSDRM_CreateDevice(void)
{ {
SDL_VideoDevice *device; SDL_VideoDevice *device;
SDL_VideoData *viddata; SDL_VideoData *viddata;
int devindex = 0; /* !!! FIXME: let app/user specify this. */
if (!KMSDRM_Available()) { if (!KMSDRM_Available()) {
return NULL; return NULL;

View File

@ -91,7 +91,7 @@ NACL_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode)
return 0; return 0;
} }
static SDL_VideoDevice *NACL_CreateDevice(int devindex) { static SDL_VideoDevice *NACL_CreateDevice(void) {
SDL_VideoDevice *device; SDL_VideoDevice *device;
if (!NACL_Available()) { if (!NACL_Available()) {

View File

@ -108,7 +108,7 @@ NGAGE_DeleteDevice(SDL_VideoDevice * device)
} }
static SDL_VideoDevice * static SDL_VideoDevice *
NGAGE_CreateDevice(int devindex) NGAGE_CreateDevice(void)
{ {
SDL_VideoDevice *device; SDL_VideoDevice *device;
SDL_VideoData *phdata; SDL_VideoData *phdata;

View File

@ -58,7 +58,7 @@ OFFSCREEN_DeleteDevice(SDL_VideoDevice * device)
} }
static SDL_VideoDevice * static SDL_VideoDevice *
OFFSCREEN_CreateDevice(int devindex) OFFSCREEN_CreateDevice(void)
{ {
SDL_VideoDevice *device; SDL_VideoDevice *device;

View File

@ -1593,7 +1593,7 @@ static void OS2_DeleteDevice(SDL_VideoDevice *device)
SDL_free(device); SDL_free(device);
} }
static SDL_VideoDevice *OS2_CreateDevice(int devindex) static SDL_VideoDevice *OS2_CreateDevice(void)
{ {
SDL_VideoDevice *device; SDL_VideoDevice *device;
@ -1648,22 +1648,22 @@ static SDL_VideoDevice *OS2_CreateDevice(int devindex)
return device; return device;
} }
static SDL_VideoDevice *OS2DIVE_CreateDevice(int devindex) static SDL_VideoDevice *OS2DIVE_CreateDevice(void)
{ {
VIDEOOUTPUTINFO stVOInfo; VIDEOOUTPUTINFO stVOInfo;
if (!voDive.QueryInfo(&stVOInfo)) { if (!voDive.QueryInfo(&stVOInfo)) {
return NULL; return NULL;
} }
return OS2_CreateDevice(devindex); return OS2_CreateDevice();
} }
static SDL_VideoDevice *OS2VMAN_CreateDevice(int devindex) static SDL_VideoDevice *OS2VMAN_CreateDevice(void)
{ {
VIDEOOUTPUTINFO stVOInfo; VIDEOOUTPUTINFO stVOInfo;
if (!voVMan.QueryInfo(&stVOInfo)) { if (!voVMan.QueryInfo(&stVOInfo)) {
return NULL; return NULL;
} }
return OS2_CreateDevice(devindex); return OS2_CreateDevice();
} }

View File

@ -51,7 +51,7 @@ RISCOS_DeleteDevice(SDL_VideoDevice * device)
} }
static SDL_VideoDevice * static SDL_VideoDevice *
RISCOS_CreateDevice(int devindex) RISCOS_CreateDevice(void)
{ {
SDL_VideoDevice *device; SDL_VideoDevice *device;
SDL_VideoData *phdata; SDL_VideoData *phdata;

View File

@ -61,7 +61,7 @@ static void UIKit_DeleteDevice(SDL_VideoDevice * device)
} }
static SDL_VideoDevice * static SDL_VideoDevice *
UIKit_CreateDevice(int devindex) UIKit_CreateDevice(void)
{ {
@autoreleasepool { @autoreleasepool {
SDL_VideoDevice *device; SDL_VideoDevice *device;

View File

@ -174,7 +174,7 @@ Wayland_DeleteDevice(SDL_VideoDevice *device)
} }
static SDL_VideoDevice * static SDL_VideoDevice *
Wayland_CreateDevice(int devindex) Wayland_CreateDevice(void)
{ {
SDL_VideoDevice *device; SDL_VideoDevice *device;
SDL_VideoData *data; SDL_VideoData *data;

View File

@ -105,7 +105,7 @@ WIN_DeleteDevice(SDL_VideoDevice * device)
} }
static SDL_VideoDevice * static SDL_VideoDevice *
WIN_CreateDevice(int devindex) WIN_CreateDevice(void)
{ {
SDL_VideoDevice *device; SDL_VideoDevice *device;
SDL_VideoData *data; SDL_VideoData *data;

View File

@ -117,7 +117,7 @@ WINRT_DeleteDevice(SDL_VideoDevice * device)
} }
static SDL_VideoDevice * static SDL_VideoDevice *
WINRT_CreateDevice(int devindex) WINRT_CreateDevice(void)
{ {
SDL_VideoDevice *device; SDL_VideoDevice *device;
SDL_VideoData *data; SDL_VideoData *data;

View File

@ -149,7 +149,7 @@ X11_SafetyNetErrHandler(Display * d, XErrorEvent * e)
} }
static SDL_VideoDevice * static SDL_VideoDevice *
X11_CreateDevice(int devindex) X11_CreateDevice(void)
{ {
SDL_VideoDevice *device; SDL_VideoDevice *device;
SDL_VideoData *data; SDL_VideoData *data;