mirror of https://github.com/encounter/SDL.git
video: removed unused devindex argument from bootstrap's create method.
This commit is contained in:
parent
cbb3f4ca37
commit
20a76b0e3e
|
@ -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. */
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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;
|
||||||
|
|
||||||
|
|
|
@ -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;
|
||||||
|
|
||||||
|
|
|
@ -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;
|
||||||
|
|
||||||
|
|
|
@ -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;*/
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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()) {
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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;
|
||||||
|
|
||||||
|
|
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue