static UI_CALLBACK(activate_monitor) { int v; resources_get_int("MonitorServer", &v); if (v == 0) { #ifdef HAVE_FULLSCREEN fullscreen_suspend(0); #endif vsync_suspend_speed_eval(); ui_dispatch_events(); /* popdown the menu */ ui_autorepeat_on(); #ifdef HAVE_MOUSE ui_restore_mouse(); #endif if (!ui_emulation_is_paused()) { monitor_startup_trap(); } else { monitor_startup(e_default_space); #ifdef HAVE_FULLSCREEN fullscreen_resume(); #endif } } }
/* This is called if all steps of an autostart operation were passed successfully */ void autostart_done(void) { autostartmode = AUTOSTART_DONE; /* Enter monitor after done */ if(trigger_monitor) { trigger_monitor = 0; monitor_startup_trap(); log_message(autostart_log, "Done. Returning to Monitor."); } else { log_message(autostart_log, "Done."); } }
static UI_CALLBACK(activate_monitor) { #ifdef HAVE_FULLSCREEN fullscreen_suspend(0); #endif vsync_suspend_speed_eval(); ui_dispatch_events(); /* popdown the menu */ ui_autorepeat_on(); #ifdef HAVE_MOUSE ui_restore_mouse(); #endif if (!ui_emulation_is_paused()) monitor_startup_trap(); else monitor_startup(); }
/* This is called if all steps of an autostart operation were passed successfully */ static void autostart_done(void) { autostartmode = AUTOSTART_DONE; if (machine_class == VICE_MACHINE_C128) { /* restore original state of key */ resources_set_int("40/80ColumnKey", c128_column4080_key); } /* Enter monitor after done */ if (trigger_monitor) { trigger_monitor = 0; monitor_startup_trap(); log_message(autostart_log, "Done. Returning to Monitor."); } else { log_message(autostart_log, "Done."); } }
static void handle_wm_command(WPARAM wparam, LPARAM lparam, HWND hwnd) { TCHAR *st_name = NULL; char *name = NULL; int i; switch (wparam) { case IDM_LOAD_PSID_FILE: st_name = uilib_select_file(hwnd, translate_text(IDS_PSID_FILE), UILIB_FILTER_ALL, UILIB_SELECTOR_TYPE_FILE_LOAD, UILIB_SELECTOR_STYLE_DEFAULT); if (st_name != NULL) { name = system_wcstombs_alloc(st_name); if (machine_autodetect_psid(st_name) >= 0) { vsid_disp(0, 0, NULL, NULL); psid_init_driver(); vsid_ui_init(); machine_play_psid(0); for (i = 0; i < VSID_S_LASTLINE; i++) { *vsidstrings[i] = 0; } machine_trigger_reset(MACHINE_RESET_MODE_SOFT); songs = psid_tunes(&default_song); current_song = default_song; psid_ui_set_tune(uint_to_void_ptr(current_song), NULL); vsid_ui_display_tune_nr(current_song); vsid_ui_set_default_tune(default_song); vsid_ui_display_nr_of_tunes(songs); } system_wcstombs_free(name); lib_free(st_name); } break; case IDM_SELECT_TUNE: ui_select_vsid_tune(hwnd); break; case IDM_NEXT_TUNE: if (current_song < songs) { current_song++; psid_ui_set_tune(uint_to_void_ptr(current_song), NULL); vsid_ui_display_tune_nr(current_song); vsid_ui_set_default_tune(default_song); vsid_ui_display_nr_of_tunes(songs); } break; case IDM_PREVIOUS_TUNE: if (current_song > 1) { current_song--; psid_ui_set_tune(uint_to_void_ptr(current_song), NULL); vsid_ui_display_tune_nr(current_song); vsid_ui_set_default_tune(default_song); vsid_ui_display_nr_of_tunes(songs); } break; case IDM_RESET_HARD: machine_trigger_reset(MACHINE_RESET_MODE_HARD); break; case IDM_RESET_SOFT: machine_trigger_reset(MACHINE_RESET_MODE_SOFT); break; case IDM_MONITOR: monitor_startup_trap(); break; case IDM_EXIT: PostMessage(hwnd, WM_CLOSE, wparam, lparam); break; case IDM_SOUND_RECORD_START: ui_sound_record_settings_dialog(hwnd); break; case IDM_SOUND_RECORD_STOP: resources_set_string("SoundRecordDeviceName", ""); break; case IDM_MAXIMUM_SPEED_CUSTOM: ui_speed_settings_dialog(hwnd); break; case IDM_SOUND_SETTINGS: ui_sound_settings_dialog(hwnd); break; case IDM_SID_SETTINGS: ui_sid_settings_dialog(hwnd, c64_sid_baseaddress); break; case IDM_SETTINGS_SAVE_FILE: if ((st_name = uilib_select_file(hwnd, translate_text(IDS_SAVE_CONFIG_FILE), UILIB_FILTER_ALL, UILIB_SELECTOR_TYPE_FILE_SAVE, UILIB_SELECTOR_STYLE_DEFAULT)) != NULL) { char *name; name = system_wcstombs_alloc(st_name); if (resources_save(st_name) < 0) { ui_error(translate_text(IDS_CANNOT_SAVE_SETTINGS)); } else { ui_message(translate_text(IDS_SETTINGS_SAVED_SUCCESS)); } system_wcstombs_free(name); lib_free(st_name); } break; case IDM_SETTINGS_LOAD_FILE: if ((st_name = uilib_select_file(hwnd, translate_text(IDS_LOAD_CONFIG_FILE), UILIB_FILTER_ALL, UILIB_SELECTOR_TYPE_FILE_LOAD, UILIB_SELECTOR_STYLE_DEFAULT)) != NULL) { char *name; name = system_wcstombs_alloc(st_name); if (resources_load(st_name) < 0) { ui_error(translate_text(IDS_CANNOT_LOAD_SETTINGS)); } else { ui_message(translate_text(IDS_SETTINGS_LOADED_SUCCESS)); } system_wcstombs_free(name); lib_free(st_name); } break; case IDM_SETTINGS_SAVE: if (resources_save(NULL) < 0) { ui_error(translate_text(IDS_CANNOT_SAVE_SETTINGS)); } else { ui_message(translate_text(IDS_SETTINGS_SAVED_SUCCESS)); } break; case IDM_SETTINGS_LOAD: if (resources_load(NULL) < 0) { ui_error(translate_text(IDS_CANNOT_LOAD_SETTINGS)); } else { ui_message(translate_text(IDS_SETTINGS_LOADED_SUCCESS)); } break; case IDM_SETTINGS_DEFAULT: resources_set_defaults(); ui_message(translate_text(IDS_DEFAULT_SETTINGS_RESTORED)); break; case IDM_LANG_EN: case IDM_LANG_DA: case IDM_LANG_DE: case IDM_LANG_ES: case IDM_LANG_FR: case IDM_LANG_HU: case IDM_LANG_IT: case IDM_LANG_KO: case IDM_LANG_NL: case IDM_LANG_PL: case IDM_LANG_RU: case IDM_LANG_SV: case IDM_LANG_TR: ui_set_language((unsigned int)wparam); vsid_ui_translate(); break; case IDM_ABOUT: case IDM_HELP: case IDM_CONTRIBUTORS: case IDM_LICENSE: case IDM_WARRANTY: case IDM_CMDLINE: uihelp_dialog(hwnd, wparam); break; default: handle_default_command(wparam, lparam, hwnd); } }
void monitor_check_remote(void) { if (monitor_network_data_available()) monitor_startup_trap(); }