Exemplo n.º 1
0
void shortcutCheckUp(Shortcuts* s, int type, int mods, int keySym)
{
    ShotcutHotkey key = { type, mods, keySym };

    if (s->state.maxSpeedIsSet) {
        actionMaxSpeedRelease();
        s->state.maxSpeedIsSet = 0;
    }

    if (HOTKEY_EQ(key, s->quit))                         actionQuit();
    if (HOTKEY_EQ(key, s->fdcTiming))                    actionToggleFdcTiming();
    if (HOTKEY_EQ(key, s->spritesEnable))                actionToggleSpriteEnable();
    if (HOTKEY_EQ(key, s->switchMsxAudio))               actionToggleMsxAudioSwitch();
    if (HOTKEY_EQ(key, s->switchFront))                  actionToggleFrontSwitch();
    if (HOTKEY_EQ(key, s->switchPause))                  actionTogglePauseSwitch();
    if (HOTKEY_EQ(key, s->captureAudio))                 actionToggleWaveCapture();
    if (HOTKEY_EQ(key, s->captureScreenshot))            actionScreenCapture();
    if (HOTKEY_EQ(key, s->cpuStateQuickLoad))            actionQuickLoadState();
    if (HOTKEY_EQ(key, s->cpuStateQuickSave))            actionQuickSaveState();

    if (HOTKEY_EQ(key, s->cartRemove[0]))                actionCartRemove1();
    if (HOTKEY_EQ(key, s->cartRemove[1]))                actionCartRemove2();
    if (HOTKEY_EQ(key, s->cartAutoReset))                actionToggleCartAutoReset();

    if (HOTKEY_EQ(key, s->diskQuickChange))              actionDiskQuickChange();
    if (HOTKEY_EQ(key, s->diskRemove[0]))                actionDiskRemoveA();
    if (HOTKEY_EQ(key, s->diskRemove[1]))                actionDiskRemoveB();
    if (HOTKEY_EQ(key, s->diskAutoReset))                actionToggleDiskAutoReset();

    if (HOTKEY_EQ(key, s->casRewind))                    actionCasRewind();
    if (HOTKEY_EQ(key, s->casRemove))                    actionCasRemove();
    if (HOTKEY_EQ(key, s->casToggleReadonly))            actionCasToggleReadonly();
    if (HOTKEY_EQ(key, s->casAutoRewind))                actionToggleCasAutoRewind();
    if (HOTKEY_EQ(key, s->casSave))                      actionCasSave();

    if (HOTKEY_EQ(key, s->emulationRunPause))            actionEmuTogglePause();
    if (HOTKEY_EQ(key, s->emulationStop))                actionEmuStop();
    if (HOTKEY_EQ(key, s->emuSpeedNormal))               actionEmuSpeedNormal();
    if (HOTKEY_EQ(key, s->emuSpeedInc))                  actionEmuSpeedIncrease();
    if (HOTKEY_EQ(key, s->emuSpeedDec))                  actionEmuSpeedDecrease();
    if (HOTKEY_EQ(key, s->emuSpeedToggle))               actionMaxSpeedToggle();
    if (HOTKEY_EQ(key, s->resetSoft))                    actionEmuResetSoft();
    if (HOTKEY_EQ(key, s->resetHard))                    actionEmuResetHard();
    if (HOTKEY_EQ(key, s->resetClean))                   actionEmuResetClean();
    if (HOTKEY_EQ(key, s->volumeIncrease))               actionVolumeIncrease();
    if (HOTKEY_EQ(key, s->volumeDecrease))               actionVolumeDecrease();
    if (HOTKEY_EQ(key, s->volumeMute))                   actionMuteToggleMaster();
    if (HOTKEY_EQ(key, s->volumeStereo))                 actionVolumeToggleStereo();
    if (HOTKEY_EQ(key, s->windowSizeNormal))             actionWindowSizeNormal();
    if (HOTKEY_EQ(key, s->windowSizeFullscreen))         actionWindowSizeFullscreen();
    if (HOTKEY_EQ(key, s->windowSizeFullscreenToggle))   actionFullscreenToggle();
}
Exemplo n.º 2
0
void actionSetFullscreen(int value) {
    if (value == 0 && state.properties->video.windowSize == P_VIDEO_SIZEFULLSCREEN) {
        if (state.windowedSize == P_VIDEO_SIZEX2) {
            actionWindowSizeNormal();
        }
        else {
            actionWindowSizeSmall();
        }
    }
    else if (state.properties->video.windowSize != P_VIDEO_SIZEFULLSCREEN) {
        actionWindowSizeFullscreen();
    }
}
Exemplo n.º 3
0
void actionFullscreenToggle() {
    if (state.properties->video.windowSize == P_VIDEO_SIZEFULLSCREEN) {
        if (state.windowedSize == P_VIDEO_SIZEX2) {
            actionWindowSizeNormal();
        }
        else {
            actionWindowSizeSmall();
        }
    }
    else {
        actionWindowSizeFullscreen();
    }
    archUpdateMenu(0);
}