const char *VideoDriver_SDL::Start(const char * const *parm) { char buf[30]; _use_hwpalette = GetDriverParamInt(parm, "hw_palette", 2); const char *s = SdlOpen(SDL_INIT_VIDEO); if (s != NULL) return s; GetVideoModes(); if (!CreateMainSurface(_cur_resolution.width, _cur_resolution.height)) { return SDL_CALL SDL_GetError(); } SDL_CALL SDL_VideoDriverName(buf, sizeof buf); DEBUG(driver, 1, "SDL: using driver '%s'", buf); MarkWholeScreenDirty(); SetupKeyboard(); _draw_threaded = GetDriverParam(parm, "no_threads") == NULL && GetDriverParam(parm, "no_thread") == NULL; return NULL; }
const char *VideoDriver_SDL::Start(const char * const *parm) { char buf[30]; const char *s = SdlOpen(SDL_INIT_VIDEO); if (s != NULL) return s; GetVideoModes(); if (!CreateMainSurface(_cur_resolution.width, _cur_resolution.height)) { return SDL_CALL SDL_GetError(); } SDL_CALL SDL_VideoDriverName(buf, sizeof buf); DEBUG(driver, 1, "SDL: using driver '%s'", buf); MarkWholeScreenDirty(); SDL_CALL SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY, SDL_DEFAULT_REPEAT_INTERVAL); SDL_CALL SDL_EnableUNICODE(1); _draw_threaded = GetDriverParam(parm, "no_threads") == NULL && GetDriverParam(parm, "no_thread") == NULL; return NULL; }