SDL window initialization and resize logic fix. Should only be calling SDL_CreateWindowFrom once. Wait for window to full be created and initialized before attempting to init SDL video renderer.
This commit is contained in:
parent
d146718204
commit
72de93bc94
|
@ -236,7 +236,11 @@ int ConsoleViewSDL_t::init(void)
|
|||
|
||||
//sleep(1);
|
||||
|
||||
sdlWindow = SDL_CreateWindowFrom( (void*)windowHandle);
|
||||
if (sdlWindow == NULL)
|
||||
{
|
||||
sdlWindow = SDL_CreateWindowFrom( (void*)windowHandle);
|
||||
}
|
||||
|
||||
if (sdlWindow == NULL)
|
||||
{
|
||||
printf("[SDL] Failed to create window from handle.\n");
|
||||
|
|
|
@ -122,7 +122,8 @@ int main( int argc, char *argv[] )
|
|||
|
||||
consoleWindow->show();
|
||||
|
||||
consoleWindow->videoInit();
|
||||
// Need to wait for window to initialize before video init can be called.
|
||||
//consoleWindow->videoInit();
|
||||
|
||||
#ifdef WIN32
|
||||
// This function is needed to fix the issue referenced below. It adds a 1-pixel border
|
||||
|
|
Loading…
Reference in New Issue