Bug fix for GUI initialization with a specified game on the command line. Sometimes the X-server needs a little more time to initialize the window. Added a short 0.1 sec usleep at startup to give X the time it needs. A few more cppcheck warning fixes made as well.
This commit is contained in:
parent
04a4b6de74
commit
6947f2bd05
|
@ -116,9 +116,6 @@ struct memViewWin_t
|
||||||
int selRomAddr;
|
int selRomAddr;
|
||||||
int jumpAddr;
|
int jumpAddr;
|
||||||
int jumpDelay;
|
int jumpDelay;
|
||||||
int row_vis_start;
|
|
||||||
int row_vis_end;
|
|
||||||
int row_vis_center;
|
|
||||||
int dialog_op;
|
int dialog_op;
|
||||||
int mode;
|
int mode;
|
||||||
int evntSrcID;
|
int evntSrcID;
|
||||||
|
@ -145,9 +142,6 @@ struct memViewWin_t
|
||||||
addr_entry = NULL;
|
addr_entry = NULL;
|
||||||
selCellLabel = NULL;
|
selCellLabel = NULL;
|
||||||
ivbar = NULL;
|
ivbar = NULL;
|
||||||
row_vis_start = 0;
|
|
||||||
row_vis_end = 64;
|
|
||||||
row_vis_center= 32;
|
|
||||||
selAddr = 0;
|
selAddr = 0;
|
||||||
selRomAddr = -1;
|
selRomAddr = -1;
|
||||||
jumpAddr = -1;
|
jumpAddr = -1;
|
||||||
|
|
|
@ -216,7 +216,7 @@ int FCEUD_GetDataFromServer(uint8 *data)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
if(SDLNet_SocketReady(UDPSocket)
|
if(SDLNet_SocketReady(UDPSocket))
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -445,12 +445,12 @@ InitVideo(FCEUGI *gi)
|
||||||
// }
|
// }
|
||||||
//#endif
|
//#endif
|
||||||
}
|
}
|
||||||
s_curbpp = s_screen->format->BitsPerPixel;
|
|
||||||
if(!s_screen) {
|
if(!s_screen) {
|
||||||
FCEUD_PrintError(SDL_GetError());
|
FCEUD_PrintError(SDL_GetError());
|
||||||
KillVideo();
|
KillVideo();
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
s_curbpp = s_screen->format->BitsPerPixel;
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
// XXX soules - this would be creating a surface on the video
|
// XXX soules - this would be creating a surface on the video
|
||||||
|
|
|
@ -861,6 +861,11 @@ int main(int argc, char *argv[])
|
||||||
InitGTKSubsystem(argc, argv);
|
InitGTKSubsystem(argc, argv);
|
||||||
while(gtk_events_pending())
|
while(gtk_events_pending())
|
||||||
gtk_main_iteration_do(FALSE);
|
gtk_main_iteration_do(FALSE);
|
||||||
|
// Ensure that the GUI has fully initialized.
|
||||||
|
// Give the X-server a small amount of time to init.
|
||||||
|
usleep(100000);
|
||||||
|
while(gtk_events_pending())
|
||||||
|
gtk_main_iteration_do(FALSE);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue