int fs_ml_main_loop() { while (g_fs_ml_running) { event_loop(); process_video_events(); fs_ml_render_iteration(); } return 0; }
int fs_ml_main_loop(void) { while (g_fs_ml_running) { fs_ml_event_loop(); process_video_events(); fs_ml_prevent_power_saving(); fs_ml_render_iteration(); } post_main_loop(); return 0; }
int fs_ml_main_loop() { while (g_fs_ml_running) { fs_ml_event_loop(); process_video_events(); #if defined(WINDOWS) || defined (MACOSX) fs_ml_prevent_power_saving(); #endif fs_ml_render_iteration(); } if (g_fs_emu_video_fullscreen) { if (SDL_getenv("FSGS_RETURN_CURSOR_TO") && SDL_getenv("FSGS_RETURN_CURSOR_TO")[0]) { // we want to improve the transitioning from FS-UAE back to // e.g. FS-UAE Game Center - avoid blinking cursor - so we try // to move it (to the bottom right of the screen). This probably // requires that the cursor is not grabbed (SDL often keeps the // cursor in the center of the screen, then). int x = -1; int y = -1; sscanf(SDL_getenv("FSGS_RETURN_CURSOR_TO"), "%d,%d", &x, &y); if (x != -1 && y != -1) { fs_log("trying to move mouse cursor to x=%d y=%d\n", x, y); Uint8 data[] = "\0"; #ifdef USE_SDL2 SDL_SetWindowGrab(g_fs_ml_window, SDL_FALSE); #else SDL_WM_GrabInput(SDL_GRAB_OFF); #endif // setting invisible cursor so we won't see it when we // enable the cursor in order to move it SDL_Cursor *cursor = SDL_CreateCursor(data, data, 8, 1, 0, 0); SDL_SetCursor(cursor); SDL_ShowCursor(SDL_ENABLE); #ifdef USE_SDL2 SDL_WarpMouseInWindow(g_fs_ml_window, x, y); #else SDL_WarpMouse(x, y); #endif } } } return 0; }