50% Half Scan Line checkbox

Config_Save_Video() Config_Load_Video()
This commit is contained in:
mpohoreski 2009-02-14 03:48:42 +00:00
parent 261b09665e
commit 36f1dbe2e7

View File

@ -4,7 +4,7 @@ AppleWin : An Apple //e emulator for Windows
Copyright (C) 1994-1996, Michael O'Brien
Copyright (C) 1999-2001, Oliver Schmidt
Copyright (C) 2002-2005, Tom Charlesworth
Copyright (C) 2006-2008, Tom Charlesworth, Michael Pohoreski
Copyright (C) 2006-2009, Tom Charlesworth, Michael Pohoreski
AppleWin is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -34,7 +34,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#include "Tfe\Uilib.h"
TCHAR computerchoices[] =
TEXT("Apple ][ (Original Model)\0")
TEXT("Apple ][ (Original)\0")
TEXT("Apple ][+\0")
TEXT("Apple //e\0")
TEXT("Enhanced Apple //e\0")
@ -94,7 +94,6 @@ TCHAR videochoices[] =
TEXT("Monochrome - Amber\0")
TEXT("Monochrome - Green\0")
TEXT("Monochrome - White\0")
TEXT("Monochrome - Authentic\0");
;
TCHAR discchoices[] = TEXT("Authentic Speed\0")
@ -108,6 +107,8 @@ enum {PG_CONFIG=0, PG_INPUT, PG_SOUND, PG_DISK, PG_ADVANCED, PG_NUM_SHEETS};
UINT g_nLastPage = PG_CONFIG;
// TODO: CLEANUP! Move to peripherals.cpp !!!
// g_nConfig_
UINT g_uScrollLockToggle = 0;
UINT g_uMouseInSlot4 = 0;
UINT g_uMouseShowCrosshair = 0;
@ -257,6 +258,24 @@ static eApple2Type GetApple2Type(DWORD NewCompType, DWORD NewCloneType)
}
}
// ====================================================================
void Config_Save_Video()
{
REGSAVE(TEXT(REGVALUE_VIDEO_MODE ),videotype);
REGSAVE(TEXT(REGVALUE_VIDEO_HALF_SCAN_LINES),g_uHalfScanLines);
REGSAVE(TEXT(REGVALUE_VIDEO_MONO_COLOR ),monochrome);
}
// ====================================================================
void Config_Load_Video()
{
REGLOAD(TEXT(REGVALUE_VIDEO_MODE ),&videotype);
REGLOAD(TEXT(REGVALUE_VIDEO_HALF_SCAN_LINES),&g_uHalfScanLines);
REGLOAD(TEXT(REGVALUE_VIDEO_MONO_COLOR ),&monochrome);
}
static void ConfigDlg_OK(HWND window, UINT afterclose)
{
DWORD NewCompType = (DWORD) SendDlgItemMessage(window,IDC_COMPUTER,CB_GETCURSEL,0,0);
@ -292,8 +311,10 @@ static void ConfigDlg_OK(HWND window, UINT afterclose)
videotype = newvidtype;
VideoReinitialize();
if ((g_nAppMode != MODE_LOGO) && (g_nAppMode != MODE_DEBUG))
{
VideoRedrawScreen();
}
}
sg_SSC.CommSetSerialPort(window,newserialport);
@ -315,7 +336,8 @@ static void ConfigDlg_OK(HWND window, UINT afterclose)
REGSAVE(TEXT("Serial Port") ,sg_SSC.GetSerialPort());
REGSAVE(TEXT("Custom Speed") ,IsDlgButtonChecked(window,IDC_CUSTOM_SPEED));
REGSAVE(TEXT("Emulation Speed") ,g_dwSpeed);
REGSAVE(TEXT("Video Emulation") ,videotype);
Config_Save_Video();
//
@ -397,6 +419,9 @@ static BOOL CALLBACK ConfigDlgProc (HWND window,
VideoChooseColor();
break;
case IDC_CHECK_HALF_SCAN_LINES:
g_uHalfScanLines = IsDlgButtonChecked(window, IDC_CHECK_HALF_SCAN_LINES) ? 1 : 0;
#if 0
case IDC_RECALIBRATE:
RegSaveValue(TEXT(""),TEXT("RunningOnOS"),0,0);
@ -440,6 +465,8 @@ static BOOL CALLBACK ConfigDlgProc (HWND window,
FillComboBox(window,IDC_COMPUTER,computerchoices,iApple2String);
FillComboBox(window,IDC_VIDEOTYPE,videochoices,videotype);
CheckDlgButton(window, IDC_CHECK_HALF_SCAN_LINES, g_uHalfScanLines ? BST_CHECKED : BST_UNCHECKED);
FillComboBox(window,IDC_SERIALPORT,serialchoices,sg_SSC.GetSerialPort());
SendDlgItemMessage(window,IDC_SLIDER_CPU_SPEED,TBM_SETRANGE,1,MAKELONG(0,40));
SendDlgItemMessage(window,IDC_SLIDER_CPU_SPEED,TBM_SETPAGESIZE,0,5);
@ -1598,7 +1625,6 @@ void PSP_Init()
PropSheetHeader.nStartPage = g_nLastPage;
PropSheetHeader.ppsp = PropSheetPages;
DWORD g_Apple2Type = 0;
g_bEnableFreezeDlgButton = UNDEFINED;
int i = PropertySheet(&PropSheetHeader); // Result: 0=Cancel, 1=OK