|
@@ -94,6 +94,10 @@ NACL_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode)
|
|
|
static SDL_VideoDevice *NACL_CreateDevice(int devindex) {
|
|
|
SDL_VideoDevice *device;
|
|
|
|
|
|
+ if (!NACL_Available()) {
|
|
|
+ return NULL;
|
|
|
+ }
|
|
|
+
|
|
|
/* Initialize all variables that we clean on shutdown */
|
|
|
device = (SDL_VideoDevice *) SDL_calloc(1, sizeof(SDL_VideoDevice));
|
|
|
if (!device) {
|
|
@@ -132,7 +136,7 @@ static SDL_VideoDevice *NACL_CreateDevice(int devindex) {
|
|
|
|
|
|
VideoBootStrap NACL_bootstrap = {
|
|
|
NACLVID_DRIVER_NAME, "SDL Native Client Video Driver",
|
|
|
- NACL_Available, NACL_CreateDevice
|
|
|
+ NACL_CreateDevice
|
|
|
};
|
|
|
|
|
|
int NACL_VideoInit(_THIS) {
|