#199 Added option to skip reset

This commit is contained in:
michaelangel007 2014-07-26 14:51:23 -07:00
parent b0928645a2
commit 825b7cddcb
6 changed files with 16 additions and 2 deletions

View File

@ -31,6 +31,7 @@ Changes:
(current memory address low byte)
-memclear 7 Initialize memory to page address
(current memory address high byte)
. [Feature #199] Added option to skip reset confirmation for reset to configuration.
. [Feature #201] Added display of current Track/Sector for the floppy drives.
- In 2x window mode the status is displayed below the drive LEDs.
- In full screen mode the status is displayed above the drive LEDS. The track/sector

View File

@ -594,6 +594,9 @@ void LoadConfiguration(void)
if (REGLOAD(TEXT(REGVALUE_WINDOW_SCALE), &dwTmp))
SetViewportScale(dwTmp);
if (REGLOAD(TEXT(REGVALUE_CONFIRM_RESET), &dwTmp))
g_bConfirmReset = dwTmp;
}
//===========================================================================

View File

@ -74,6 +74,7 @@ enum AppMode_e
#define REG_CONFIG "Configuration"
#define REGVALUE_APPLE2_TYPE "Apple2 Type"
#define REGVALUE_OLD_APPLE2_TYPE "Computer Emulation" // Deprecated
#define REGVALUE_CONFIRM_RESET "Confirm Reset" // Added at 1.24.1 PageConfig
#define REGVALUE_SPKR_VOLUME "Speaker Volume"
#define REGVALUE_MB_VOLUME "Mockingboard Volume"
#define REGVALUE_SAVESTATE_FILENAME "Save State Filename"

View File

@ -88,6 +88,9 @@ BOOL CPageConfig::DlgProcInternal(HWND hWnd, UINT message, WPARAM wparam, LPARAM
VideoChooseColor();
break;
case IDC_CHECK_CONFIRM_RESET:
g_bConfirmReset = IsDlgButtonChecked(hWnd, IDC_CHECK_CONFIRM_RESET) ? 1 : 0;
case IDC_CHECK_HALF_SCAN_LINES:
g_uHalfScanLines = IsDlgButtonChecked(hWnd, IDC_CHECK_HALF_SCAN_LINES) ? 1 : 0;
@ -140,6 +143,8 @@ BOOL CPageConfig::DlgProcInternal(HWND hWnd, UINT message, WPARAM wparam, LPARAM
m_PropertySheetHelper.FillComboBox(hWnd, IDC_COMPUTER, m_ComputerChoices, nCurrentChoice);
}
CheckDlgButton(hWnd, IDC_CHECK_CONFIRM_RESET, g_bConfirmReset ? BST_CHECKED : BST_UNCHECKED );
m_PropertySheetHelper.FillComboBox(hWnd,IDC_VIDEOTYPE,g_aVideoChoices,g_eVideoType);
CheckDlgButton(hWnd, IDC_CHECK_HALF_SCAN_LINES, g_uHalfScanLines ? BST_CHECKED : BST_UNCHECKED);
@ -207,6 +212,8 @@ void CPageConfig::DlgOK(HWND hWnd)
}
}
REGSAVE(TEXT(REGVALUE_CONFIRM_RESET), g_bConfirmReset);
const DWORD newserialport = (DWORD) SendDlgItemMessage(hWnd, IDC_SERIALPORT, CB_GETCURSEL, 0, 0);
sg_SSC.CommSetSerialPort(hWnd, newserialport);
RegSaveString( TEXT(REG_CONFIG),

View File

@ -46,7 +46,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
static const int kDEFAULT_VIEWPORT_SCALE = 2;
static int g_nViewportCX = FRAMEBUFFER_W * kDEFAULT_VIEWPORT_SCALE;
static int g_nViewportCY = FRAMEBUFFER_H * kDEFAULT_VIEWPORT_SCALE;
static int g_nViewportScale = kDEFAULT_VIEWPORT_SCALE;
static int g_nViewportScale = kDEFAULT_VIEWPORT_SCALE; // saved REGSAVE
static int g_nOldViewportScale = kDEFAULT_VIEWPORT_SCALE;
static int g_nMaxViewportScale = kDEFAULT_VIEWPORT_SCALE;
@ -111,6 +111,7 @@ static RECT framerect = {0,0,0,0};
HWND g_hFrameWindow = (HWND)0;
BOOL g_bIsFullScreen = 0;
BOOL g_bConfirmReset = 1; // saved PageConfig REGSAVE
BOOL g_bMultiMon = 0; // OFF = load window position & clamp initial frame to screen, ON = use window position as is
static BOOL helpquit = 0;
@ -1681,7 +1682,7 @@ static void ScreenWindowResize(const bool bCtrlKey)
static bool ConfirmReboot(bool bFromButtonUI)
{
if (!bFromButtonUI)
if (!bFromButtonUI || !g_bConfirmReset)
return true;
int res = MessageBox(g_hFrameWindow, "Are you sure you want to reboot?\n(All data will be lost!)", "Reboot", MB_ICONWARNING|MB_YESNO);

View File

@ -23,6 +23,7 @@
// Win32
extern HWND g_hFrameWindow;
extern BOOL g_bIsFullScreen;
extern BOOL g_bConfirmReset; // saved PageConfig REGSAVE
extern BOOL g_bMultiMon;
// Emulator