Skip to content

Commit

Permalink
Shortcut combo mapped to Select button
Browse files Browse the repository at this point in the history
  • Loading branch information
pingflood committed Dec 24, 2019
1 parent 80ee8f9 commit 42d58f7
Showing 1 changed file with 32 additions and 28 deletions.
60 changes: 32 additions & 28 deletions src/drivers/dingux-sdl/input.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -311,25 +311,20 @@ static void KeyboardCommands() {
return;
}

// toggle fastforwad
if(ispressed(DINGOO_L)) {
fastforward = !fastforward;
resetkey(DINGOO_L);
}
// R shift + combokeys
if(ispressed(DINGOO_R)) {
if(ispressed(DINGOO_SELECT)) {
extern int g_slot; // import from gui.cpp
void save_preview(); // import from gui.cpp
if(_keyonly(DINGOO_A)) { // R + A save state
if(_keyonly(DINGOO_R)) { // R + A save state
FCEUI_SelectState(g_slot, 0);
FCEUI_SaveState(NULL);
save_preview();
resetkey(DINGOO_A);
resetkey(DINGOO_R);
}
if(_keyonly(DINGOO_B)) { // R + B load state
if(_keyonly(DINGOO_L)) { // R + B load state
FCEUI_SelectState(g_slot, 0);
FCEUI_LoadState(NULL);
resetkey(DINGOO_B);
resetkey(DINGOO_L);
}
if(_keyonly(DINGOO_X)) { // R + X toggle fullscreen
extern int s_fullscreen; // from dingoo_video.cpp
Expand All @@ -339,36 +334,45 @@ static void KeyboardCommands() {
dingoo_clear_video();
resetkey(DINGOO_X);
}
if(_keyonly(DINGOO_Y)) { // R + Y flip fds disk
if(_keyonly(DINGOO_B)) { // R + Y flip fds disk
if(gametype == GIT_FDS) FCEUI_FDSFlip();
resetkey(DINGOO_Y);
resetkey(DINGOO_B);
}
if(_keyonly(DINGOO_UP)) { // R + UP tooggle fps show
if(_keyonly(DINGOO_A)) { // R + SELECT
FCEUI_SaveSnapshot();
resetkey(DINGOO_A);
}
if(_keyonly(DINGOO_Y)) { // R + UP tooggle fps show
extern int showfps; // from dingoo.cpp
showfps ^= 1;
g_config->setOption("SDL.ShowFPS", showfps);
resetkey(DINGOO_UP);
}
if(_keyonly(DINGOO_DOWN)) {// R + DOWN activate subtitle display (??) is this really needed
resetkey(DINGOO_DOWN);
resetkey(DINGOO_Y);
}
if(_keyonly(DINGOO_LEFT)) { // R + LEFT insert vsuini coin
if (gametype == GIT_VSUNI) FCEUI_VSUniCoin();
resetkey(DINGOO_LEFT);
}
if(_keyonly(DINGOO_RIGHT)) { // R + RIGHT frame advancing (??)
resetkey(DINGOO_RIGHT);
}
if(_keyonly(DINGOO_SELECT)) { // R + SELECT
FCEUI_SaveSnapshot();
resetkey(DINGOO_SELECT);
}
if(_keyonly(DINGOO_START)) { // R + START pause emulation
FCEUI_ToggleEmulationPause();
resetkey(DINGOO_START);
}
// if(_keyonly(DINGOO_DOWN)) {// R + DOWN activate subtitle display (??) is this really needed
// resetkey(DINGOO_DOWN);
// }
// if(_keyonly(DINGOO_RIGHT)) { // R + RIGHT frame advancing (??)
// resetkey(DINGOO_RIGHT);
// }
// if(_keyonly(DINGOO_START)) { // R + START pause emulation
// FCEUI_ToggleEmulationPause();
// resetkey(DINGOO_START);
// }
}

// toggle fastforwad
if(ispressed(DINGOO_L)) {
fastforward = true; //!fastforward;
// fastforward = !fastforward;
// resetkey(DINGOO_L);
} else {
fastforward = false;
}

/*
// Toggle Movie auto-backup
if(keyonly(M) && is_shift) {
Expand Down

0 comments on commit 42d58f7

Please sign in to comment.