mirror of
https://github.com/0ldsk00l/nestopia.git
synced 2024-06-22 06:02:26 -04:00
Compare commits
2 commits
0ab75febef
...
5763bb19ff
Author | SHA1 | Date | |
---|---|---|---|
5763bb19ff | |||
2ba35ee0cf |
|
@ -444,7 +444,7 @@ static void fltkui_about(Fl_Widget* w, void* userdata) {
|
|||
while (about.shown()) { Fl::wait(); }
|
||||
}
|
||||
|
||||
static void quit_cb(Fl_Widget* w, void* userdata) {
|
||||
void FltkUi::quit(Fl_Widget *w, void *data) {
|
||||
videomgr->renderer_deinit();
|
||||
nstwin->hide();
|
||||
}
|
||||
|
@ -533,7 +533,7 @@ static Fl_Menu_Item menutable[] = {
|
|||
{"Load Movie...", 0, fltkui_movie_load, 0, FL_MENU_INACTIVE},
|
||||
{"Record Movie...", 0, fltkui_movie_save, 0, FL_MENU_INACTIVE},
|
||||
{"Stop Movie", 0, fltkui_movie_stop, 0, FL_MENU_DIVIDER|FL_MENU_INACTIVE},
|
||||
{"&Quit", FL_ALT + 'q', quit_cb, 0, 0},
|
||||
{"&Quit", FL_ALT + 'q', FltkUi::quit, 0, 0},
|
||||
{0}, // End File
|
||||
{"&Emulator", FL_ALT + 'e', 0, 0, FL_SUBMENU},
|
||||
{"Pause", 0, fltkui_pause, 0, FL_MENU_DIVIDER|FL_MENU_INACTIVE},
|
||||
|
|
|
@ -43,4 +43,5 @@ public:
|
|||
static void set_ffspeed(bool on);
|
||||
static void show_msgbox(bool show);
|
||||
static void fullscreen(Fl_Widget *w = nullptr, void *data = nullptr);
|
||||
static void quit(Fl_Widget *w = nullptr, void *data = nullptr);
|
||||
};
|
||||
|
|
|
@ -43,11 +43,11 @@ jg_inputinfo_t *inputinfo[5];
|
|||
jg_inputstate_t uistate;
|
||||
jg_inputinfo_t uiinfo;
|
||||
|
||||
constexpr size_t NDEFS_UI = 12;
|
||||
constexpr size_t NDEFS_UI = 13;
|
||||
const char *defs_ui[NDEFS_UI] = {
|
||||
"ResetSoft", "ResetHard", "FDSNextSide", "FDSInsertEject",
|
||||
"QuickSave1", "QuickSave2", "QuickLoad1", "QuickLoad2",
|
||||
"Fullscreen", "Pause", "FastForward", "Screenshot"
|
||||
"Fullscreen", "Pause", "FastForward", "Screenshot", "Quit"
|
||||
};
|
||||
|
||||
bool uiprev[NDEFS_UI];
|
||||
|
@ -129,7 +129,8 @@ void InputManager::assign() {
|
|||
0xffbd + 6, 0xffbd + 7, 0xffbd + 8, 'f', 'p', '`', 0xffbd + 9
|
||||
};
|
||||
|
||||
for (size_t i = 0; i < NDEFS_UI; ++i) {
|
||||
// -1 to prevent "Quit" from being defined by default
|
||||
for (size_t i = 0; i < NDEFS_UI - 1; ++i) {
|
||||
// Keyboard/Mouse
|
||||
std::string val = setmgr.get_input("ui", uiinfo.defs[i]);
|
||||
if (val.empty()) {
|
||||
|
@ -487,6 +488,9 @@ void InputManager::ui_events() {
|
|||
case 11: // Screenshot
|
||||
UiAdapter::screenshot();
|
||||
break;
|
||||
case 12: // Quit
|
||||
UiAdapter::quit();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -48,9 +48,9 @@ jg_setting_t fe_settings[] = {
|
|||
2, 0, 3, FLAG_FRONTEND
|
||||
},
|
||||
{ "v_aspect", "Aspect Ratio",
|
||||
"0 = TV Correct, 1 = 1:1, 2 = 4:3",
|
||||
"Set the aspect ratio to the correct TV aspect, 1:1 (square pixels), or 4:3",
|
||||
0, 0, 2, FLAG_FRONTEND
|
||||
"0 = Auto, 1 = 1:1, 2 = 4:3, 3 = 5:4",
|
||||
"Set the aspect ratio to the correct TV aspect (Auto), 1:1 (square pixels), 4:3, or 5:4",
|
||||
0, 0, 3, FLAG_FRONTEND
|
||||
},
|
||||
{ "v_scale", "Initial Window Scale",
|
||||
"N = Window scale factor at startup",
|
||||
|
|
|
@ -48,6 +48,10 @@ void UiAdapter::pause() {
|
|||
void UiAdapter::screenshot() {
|
||||
}
|
||||
|
||||
void UiAdapter::quit() {
|
||||
FltkUi::quit();
|
||||
}
|
||||
|
||||
void UiAdapter::show_msgbox(bool show) {
|
||||
FltkUi::show_msgbox(show);
|
||||
}
|
||||
|
|
|
@ -9,6 +9,7 @@ public:
|
|||
static void fastforward(bool ff);
|
||||
static void pause();
|
||||
static void screenshot();
|
||||
static void quit();
|
||||
static void show_msgbox(bool show);
|
||||
|
||||
private:
|
||||
|
|
|
@ -880,6 +880,9 @@ void VideoManager::set_aspect() {
|
|||
case 2:
|
||||
aspect = 4.0/3.0;
|
||||
break;
|
||||
case 3:
|
||||
aspect = 5.0/4.0;
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue