video: removed unused devindex argument from bootstrap's create method.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318
diff --git a/src/video/SDL_sysvideo.h b/src/video/SDL_sysvideo.h
index 9e2bfb9..fe643a4 100644
--- a/src/video/SDL_sysvideo.h
+++ b/src/video/SDL_sysvideo.h
@@ -432,7 +432,7 @@ typedef struct VideoBootStrap
{
const char *name;
const char *desc;
- SDL_VideoDevice *(*create) (int devindex);
+ SDL_VideoDevice *(*create) (void);
} VideoBootStrap;
/* Not all of these are available in a given build. Use #ifdefs, etc. */
diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c
index 144326f..d1ce9d4 100644
--- a/src/video/SDL_video.c
+++ b/src/video/SDL_video.c
@@ -391,12 +391,11 @@ int
SDL_VideoInit(const char *driver_name)
{
SDL_VideoDevice *video;
- int index;
- int i;
SDL_bool init_events = SDL_FALSE;
SDL_bool init_keyboard = SDL_FALSE;
SDL_bool init_mouse = SDL_FALSE;
SDL_bool init_touch = SDL_FALSE;
+ int i;
/* Check to make sure we don't overwrite '_this' */
if (_this != NULL) {
@@ -426,7 +425,6 @@ SDL_VideoInit(const char *driver_name)
init_touch = SDL_TRUE;
/* Select the proper video driver */
- i = index = 0;
video = NULL;
if (driver_name == NULL) {
driver_name = SDL_GetHint(SDL_HINT_VIDEODRIVER);
@@ -441,7 +439,7 @@ SDL_VideoInit(const char *driver_name)
for (i = 0; bootstrap[i]; ++i) {
if ((driver_attempt_len == SDL_strlen(bootstrap[i]->name)) &&
(SDL_strncasecmp(bootstrap[i]->name, driver_attempt, driver_attempt_len) == 0)) {
- video = bootstrap[i]->create(index);
+ video = bootstrap[i]->create();
break;
}
}
@@ -450,7 +448,7 @@ SDL_VideoInit(const char *driver_name)
}
} else {
for (i = 0; bootstrap[i]; ++i) {
- video = bootstrap[i]->create(index);
+ video = bootstrap[i]->create();
if (video != NULL) {
break;
}
diff --git a/src/video/android/SDL_androidvideo.c b/src/video/android/SDL_androidvideo.c
index 9555ea0..c596df8 100644
--- a/src/video/android/SDL_androidvideo.c
+++ b/src/video/android/SDL_androidvideo.c
@@ -84,7 +84,7 @@ Android_DeleteDevice(SDL_VideoDevice *device)
}
static SDL_VideoDevice *
-Android_CreateDevice(int devindex)
+Android_CreateDevice(void)
{
SDL_VideoDevice *device;
SDL_VideoData *data;
diff --git a/src/video/cocoa/SDL_cocoavideo.m b/src/video/cocoa/SDL_cocoavideo.m
index 1df31f6..987fa2d 100644
--- a/src/video/cocoa/SDL_cocoavideo.m
+++ b/src/video/cocoa/SDL_cocoavideo.m
@@ -55,7 +55,7 @@ Cocoa_DeleteDevice(SDL_VideoDevice * device)
}}
static SDL_VideoDevice *
-Cocoa_CreateDevice(int devindex)
+Cocoa_CreateDevice(void)
{ @autoreleasepool
{
SDL_VideoDevice *device;
diff --git a/src/video/directfb/SDL_DirectFB_video.c b/src/video/directfb/SDL_DirectFB_video.c
index cce1ee5..22badec 100644
--- a/src/video/directfb/SDL_DirectFB_video.c
+++ b/src/video/directfb/SDL_DirectFB_video.c
@@ -61,7 +61,7 @@
static int DirectFB_VideoInit(_THIS);
static void DirectFB_VideoQuit(_THIS);
-static SDL_VideoDevice *DirectFB_CreateDevice(int devindex);
+static SDL_VideoDevice *DirectFB_CreateDevice(void);
VideoBootStrap DirectFB_bootstrap = {
"directfb", "DirectFB",
@@ -83,7 +83,7 @@ DirectFB_DeleteDevice(SDL_VideoDevice * device)
}
static SDL_VideoDevice *
-DirectFB_CreateDevice(int devindex)
+DirectFB_CreateDevice(void)
{
SDL_VideoDevice *device;
diff --git a/src/video/dummy/SDL_nullvideo.c b/src/video/dummy/SDL_nullvideo.c
index a7fb1aa..3e21151 100644
--- a/src/video/dummy/SDL_nullvideo.c
+++ b/src/video/dummy/SDL_nullvideo.c
@@ -75,7 +75,7 @@ DUMMY_DeleteDevice(SDL_VideoDevice * device)
}
static SDL_VideoDevice *
-DUMMY_CreateDevice(int devindex)
+DUMMY_CreateDevice(void)
{
SDL_VideoDevice *device;
diff --git a/src/video/emscripten/SDL_emscriptenvideo.c b/src/video/emscripten/SDL_emscriptenvideo.c
index 4c6038f..831af8e 100644
--- a/src/video/emscripten/SDL_emscriptenvideo.c
+++ b/src/video/emscripten/SDL_emscriptenvideo.c
@@ -62,7 +62,7 @@ Emscripten_DeleteDevice(SDL_VideoDevice * device)
}
static SDL_VideoDevice *
-Emscripten_CreateDevice(int devindex)
+Emscripten_CreateDevice(void)
{
SDL_VideoDevice *device;
diff --git a/src/video/haiku/SDL_bvideo.cc b/src/video/haiku/SDL_bvideo.cc
index 1ac3201..e409f3c 100644
--- a/src/video/haiku/SDL_bvideo.cc
+++ b/src/video/haiku/SDL_bvideo.cc
@@ -55,7 +55,7 @@ static SDL_INLINE SDL_BWin *_ToBeWin(SDL_Window *window) {
/* End undefined functions */
static SDL_VideoDevice *
-HAIKU_CreateDevice(int devindex)
+HAIKU_CreateDevice(void)
{
SDL_VideoDevice *device;
/*SDL_VideoData *data;*/
diff --git a/src/video/kmsdrm/SDL_kmsdrmvideo.c b/src/video/kmsdrm/SDL_kmsdrmvideo.c
index 07a15ae..8f653b5 100644
--- a/src/video/kmsdrm/SDL_kmsdrmvideo.c
+++ b/src/video/kmsdrm/SDL_kmsdrmvideo.c
@@ -213,10 +213,11 @@ KMSDRM_DeleteDevice(SDL_VideoDevice * device)
}
static SDL_VideoDevice *
-KMSDRM_CreateDevice(int devindex)
+KMSDRM_CreateDevice(void)
{
SDL_VideoDevice *device;
SDL_VideoData *viddata;
+ int devindex = 0; /* !!! FIXME: let app/user specify this. */
if (!KMSDRM_Available()) {
return NULL;
diff --git a/src/video/nacl/SDL_naclvideo.c b/src/video/nacl/SDL_naclvideo.c
index 96901e8..986bfb3 100644
--- a/src/video/nacl/SDL_naclvideo.c
+++ b/src/video/nacl/SDL_naclvideo.c
@@ -91,7 +91,7 @@ NACL_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode)
return 0;
}
-static SDL_VideoDevice *NACL_CreateDevice(int devindex) {
+static SDL_VideoDevice *NACL_CreateDevice(void) {
SDL_VideoDevice *device;
if (!NACL_Available()) {
diff --git a/src/video/ngage/SDL_ngagevideo.cpp b/src/video/ngage/SDL_ngagevideo.cpp
index eea21e8..d0ed05f 100644
--- a/src/video/ngage/SDL_ngagevideo.cpp
+++ b/src/video/ngage/SDL_ngagevideo.cpp
@@ -108,7 +108,7 @@ NGAGE_DeleteDevice(SDL_VideoDevice * device)
}
static SDL_VideoDevice *
-NGAGE_CreateDevice(int devindex)
+NGAGE_CreateDevice(void)
{
SDL_VideoDevice *device;
SDL_VideoData *phdata;
diff --git a/src/video/offscreen/SDL_offscreenvideo.c b/src/video/offscreen/SDL_offscreenvideo.c
index 19c7cb5..3e1aafe 100644
--- a/src/video/offscreen/SDL_offscreenvideo.c
+++ b/src/video/offscreen/SDL_offscreenvideo.c
@@ -58,7 +58,7 @@ OFFSCREEN_DeleteDevice(SDL_VideoDevice * device)
}
static SDL_VideoDevice *
-OFFSCREEN_CreateDevice(int devindex)
+OFFSCREEN_CreateDevice(void)
{
SDL_VideoDevice *device;
diff --git a/src/video/os2/SDL_os2video.c b/src/video/os2/SDL_os2video.c
index 411de8c..a9599c8 100644
--- a/src/video/os2/SDL_os2video.c
+++ b/src/video/os2/SDL_os2video.c
@@ -1593,7 +1593,7 @@ static void OS2_DeleteDevice(SDL_VideoDevice *device)
SDL_free(device);
}
-static SDL_VideoDevice *OS2_CreateDevice(int devindex)
+static SDL_VideoDevice *OS2_CreateDevice(void)
{
SDL_VideoDevice *device;
@@ -1648,22 +1648,22 @@ static SDL_VideoDevice *OS2_CreateDevice(int devindex)
return device;
}
-static SDL_VideoDevice *OS2DIVE_CreateDevice(int devindex)
+static SDL_VideoDevice *OS2DIVE_CreateDevice(void)
{
VIDEOOUTPUTINFO stVOInfo;
if (!voDive.QueryInfo(&stVOInfo)) {
return NULL;
}
- return OS2_CreateDevice(devindex);
+ return OS2_CreateDevice();
}
-static SDL_VideoDevice *OS2VMAN_CreateDevice(int devindex)
+static SDL_VideoDevice *OS2VMAN_CreateDevice(void)
{
VIDEOOUTPUTINFO stVOInfo;
if (!voVMan.QueryInfo(&stVOInfo)) {
return NULL;
}
- return OS2_CreateDevice(devindex);
+ return OS2_CreateDevice();
}
diff --git a/src/video/riscos/SDL_riscosvideo.c b/src/video/riscos/SDL_riscosvideo.c
index ebd4952..4763011 100644
--- a/src/video/riscos/SDL_riscosvideo.c
+++ b/src/video/riscos/SDL_riscosvideo.c
@@ -51,7 +51,7 @@ RISCOS_DeleteDevice(SDL_VideoDevice * device)
}
static SDL_VideoDevice *
-RISCOS_CreateDevice(int devindex)
+RISCOS_CreateDevice(void)
{
SDL_VideoDevice *device;
SDL_VideoData *phdata;
diff --git a/src/video/uikit/SDL_uikitvideo.m b/src/video/uikit/SDL_uikitvideo.m
index 81d7bf6..8afb665 100644
--- a/src/video/uikit/SDL_uikitvideo.m
+++ b/src/video/uikit/SDL_uikitvideo.m
@@ -61,7 +61,7 @@ static void UIKit_DeleteDevice(SDL_VideoDevice * device)
}
static SDL_VideoDevice *
-UIKit_CreateDevice(int devindex)
+UIKit_CreateDevice(void)
{
@autoreleasepool {
SDL_VideoDevice *device;
diff --git a/src/video/wayland/SDL_waylandvideo.c b/src/video/wayland/SDL_waylandvideo.c
index 1bed2b2..75bd807 100644
--- a/src/video/wayland/SDL_waylandvideo.c
+++ b/src/video/wayland/SDL_waylandvideo.c
@@ -174,7 +174,7 @@ Wayland_DeleteDevice(SDL_VideoDevice *device)
}
static SDL_VideoDevice *
-Wayland_CreateDevice(int devindex)
+Wayland_CreateDevice(void)
{
SDL_VideoDevice *device;
SDL_VideoData *data;
diff --git a/src/video/windows/SDL_windowsvideo.c b/src/video/windows/SDL_windowsvideo.c
index 6114808..2b3f0a4 100644
--- a/src/video/windows/SDL_windowsvideo.c
+++ b/src/video/windows/SDL_windowsvideo.c
@@ -105,7 +105,7 @@ WIN_DeleteDevice(SDL_VideoDevice * device)
}
static SDL_VideoDevice *
-WIN_CreateDevice(int devindex)
+WIN_CreateDevice(void)
{
SDL_VideoDevice *device;
SDL_VideoData *data;
diff --git a/src/video/winrt/SDL_winrtvideo.cpp b/src/video/winrt/SDL_winrtvideo.cpp
index e2d3f9e..a71ba9b 100644
--- a/src/video/winrt/SDL_winrtvideo.cpp
+++ b/src/video/winrt/SDL_winrtvideo.cpp
@@ -117,7 +117,7 @@ WINRT_DeleteDevice(SDL_VideoDevice * device)
}
static SDL_VideoDevice *
-WINRT_CreateDevice(int devindex)
+WINRT_CreateDevice(void)
{
SDL_VideoDevice *device;
SDL_VideoData *data;
diff --git a/src/video/x11/SDL_x11video.c b/src/video/x11/SDL_x11video.c
index fc8c878..92045ca 100644
--- a/src/video/x11/SDL_x11video.c
+++ b/src/video/x11/SDL_x11video.c
@@ -149,7 +149,7 @@ X11_SafetyNetErrHandler(Display * d, XErrorEvent * e)
}
static SDL_VideoDevice *
-X11_CreateDevice(int devindex)
+X11_CreateDevice(void)
{
SDL_VideoDevice *device;
SDL_VideoData *data;