Commit 8de23bec authored by Sam Lantinga's avatar Sam Lantinga

Don't try to register the app if video code is disabled

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%4016
parent ea1961a5
...@@ -160,12 +160,16 @@ int console_main(int argc, char *argv[]) ...@@ -160,12 +160,16 @@ int console_main(int argc, char *argv[])
atexit(cleanup_output); atexit(cleanup_output);
atexit(SDL_Quit); atexit(SDL_Quit);
/* Create and register our class, then run main code */ #ifndef DISABLE_VIDEO
/* Create and register our class */
if ( SDL_RegisterApp(appname, CS_BYTEALIGNCLIENT, if ( SDL_RegisterApp(appname, CS_BYTEALIGNCLIENT,
GetModuleHandle(NULL)) < 0 ) { GetModuleHandle(NULL)) < 0 ) {
ShowError("WinMain() error", SDL_GetError()); ShowError("WinMain() error", SDL_GetError());
exit(1); exit(1);
} }
#endif /* !DISABLE_VIDEO */
/* Run the application main() code */
SDL_main(argc, argv); SDL_main(argc, argv);
/* Exit cleanly, calling atexit() functions */ /* Exit cleanly, calling atexit() functions */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment