| 2014 | } |
| 2015 | |
| 2016 | void Win32Frame::ProcessButtonClick(int button, bool bFromButtonUI /*=false*/) |
| 2017 | { |
| 2018 | SoundCore_SetFade(FADE_OUT); |
| 2019 | bool bAllowFadeIn = true; |
| 2020 | |
| 2021 | #if DEBUG_DD_PALETTE |
| 2022 | LogOutput( "Button: F%d Full Screen: %d\n", button+1, g_bIsFullScreen ); |
| 2023 | #endif |
| 2024 | |
| 2025 | switch (button) { |
| 2026 | |
| 2027 | case BTN_HELP: |
| 2028 | { |
| 2029 | const std::string filename = g_sProgramDir + "APPLEWIN.CHM"; |
| 2030 | |
| 2031 | // (GH#437) For any internet downloaded AppleWin.chm files (stored on an NTFS drive) there may be an Alt Data Stream containing a Zone Identifier |
| 2032 | // - try to delete it, otherwise the content won't be displayed unless it's unblock (via File Properties) |
| 2033 | { |
| 2034 | const std::string filename_with_zone_identifier = filename + ":Zone.Identifier"; |
| 2035 | DeleteFile(filename_with_zone_identifier.c_str()); |
| 2036 | } |
| 2037 | |
| 2038 | HtmlHelp(GetDesktopWindow(), filename.c_str(), HH_DISPLAY_TOC, 0); // GH#1403 |
| 2039 | helpquit = 1; |
| 2040 | } |
| 2041 | break; |
| 2042 | |
| 2043 | case BTN_RUN: |
| 2044 | KeybUpdateCtrlShiftStatus(); |
| 2045 | if( KeybGetCtrlStatus() ) |
| 2046 | { |
| 2047 | CtrlReset(); |
| 2048 | if (g_nAppMode == MODE_DEBUG) |
| 2049 | DebugDisplay(TRUE); |
| 2050 | return; |
| 2051 | } |
| 2052 | |
| 2053 | if (g_nAppMode == MODE_LOGO) |
| 2054 | { |
| 2055 | if (GetCardMgr().QuerySlot(SLOT6) == CT_Disk2) |
| 2056 | dynamic_cast<Disk2InterfaceCard&>(GetCardMgr().GetRef(SLOT6)).Boot(); |
| 2057 | |
| 2058 | LogFileTimeUntilFirstKeyReadReset(); |
| 2059 | |
| 2060 | if (!DebugQueryAnyBreakpointsSet()) |
| 2061 | { |
| 2062 | g_nAppMode = MODE_RUNNING; |
| 2063 | } |
| 2064 | else |
| 2065 | { |
| 2066 | // EG. When using -debugger-auto-run <file.txt> (to set breakpoints), then we want to be MODE_STEPPING when leaving MODE_LOGO |
| 2067 | DebugBegin(); |
| 2068 | DebugExitDebugger(); // Exit debugger, switch to MODE_STEPPING |
| 2069 | g_bDebuggerEatKey = false; // Don't "eat" the next keypress when leaving the debugger |
| 2070 | } |
| 2071 | } |
| 2072 | else if ((g_nAppMode == MODE_RUNNING) || (g_nAppMode == MODE_DEBUG) || (g_nAppMode == MODE_STEPPING) || (g_nAppMode == MODE_PAUSED)) |
| 2073 | { |
nothing calls this directly
no test coverage detected