mirror of
https://github.com/AppleWin/AppleWin.git
synced 2026-04-26 11:30:11 +00:00
WIP: 'Reset all to Default' button: Master volume, Full-screen drive/keyb status
This commit is contained in:
@@ -100,14 +100,14 @@ BEGIN
|
||||
PUSHBUTTON "Monochrome &Color...",IDC_MONOCOLOR,12,66,80,14
|
||||
CONTROL "50% Scan lines",IDC_CHECK_HALF_SCAN_LINES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,142,53,62,10
|
||||
CONTROL "Vertical blend",IDC_CHECK_VERTICAL_BLEND,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,142,68,62,10
|
||||
CONTROL "Full-Screen: Show drive/keyboard status",IDC_CHECK_FS_SHOW_SUBUNIT_STATUS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,84,140,10
|
||||
CONTROL "50Hz video",IDC_CHECK_50HZ_VIDEO,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,142,100,51,10
|
||||
CONTROL "50Hz video",IDC_CHECK_50HZ_VIDEO,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,142,84,51,10
|
||||
CONTROL "Full-Screen: Show drive/keyboard status",IDC_CHECK_FS_SHOW_SUBUNIT_STATUS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,100,140,10
|
||||
|
||||
GROUPBOX "Emulation Speed Control",IDC_STATIC,5,119,200,96
|
||||
CONTROL "&Enhanced floppy disk access speed (all drives)",IDC_ENHANCE_DISK_ENABLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,132,160,10
|
||||
CONTROL "&Scroll Lock acts as toggle for full-speed CPU",IDC_SCROLLLOCK_TOGGLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,146,166,10
|
||||
CONTROL "Use &Authentic Machine Speed",IDC_AUTHENTIC_SPEED,"Button",BS_AUTORADIOBUTTON,15,160,115,10
|
||||
CONTROL "Select C&ustom Speed (in MHz)",IDC_CUSTOM_SPEED,"Button",BS_AUTORADIOBUTTON,15,172,115,10
|
||||
CONTROL "&Enhanced floppy disk access speed (all drives)",IDC_ENHANCE_DISK_ENABLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,132,160,10
|
||||
CONTROL "&Scroll Lock acts as toggle for full-speed CPU",IDC_SCROLLLOCK_TOGGLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,146,166,10
|
||||
CONTROL "Use &Authentic Machine Speed",IDC_AUTHENTIC_SPEED,"Button",BS_AUTORADIOBUTTON,12,160,115,10
|
||||
CONTROL "Select C&ustom Speed (in MHz)",IDC_CUSTOM_SPEED,"Button",BS_AUTORADIOBUTTON,12,172,115,10
|
||||
CONTROL "Generic2",IDC_SLIDER_CPU_SPEED,"msctls_trackbar32",TBS_AUTOTICKS | WS_TABSTOP,25,183,160,15
|
||||
CTEXT "0.5",IDC_0_5_MHz,23,199,20,10
|
||||
CTEXT "1.0",IDC_1_0_MHz,59,199,20,10
|
||||
|
||||
@@ -26,8 +26,10 @@
|
||||
#include "../CardManager.h"
|
||||
#include "../Interface.h" // VideoRefreshRate_e, GetVideoRefreshRate()
|
||||
#include "../Memory.h"
|
||||
#include "../Speaker.h"
|
||||
#include "../Uthernet2.h"
|
||||
#include "../Tfe/PCapBackend.h"
|
||||
#include "../Windows/Win32Frame.h"
|
||||
|
||||
|
||||
// zero initialise
|
||||
@@ -41,10 +43,12 @@ CConfigNeedingRestart::CConfigNeedingRestart()
|
||||
m_tfeVirtualDNS = false;
|
||||
m_bEnableTheFreezesF8Rom = 0;
|
||||
m_uSaveLoadStateMsg = 0;
|
||||
m_masterVolume = 0;
|
||||
m_videoType = VT_DEFAULT;
|
||||
m_videoStyle = VS_NONE;
|
||||
m_videoRefreshRate = VR_NONE;
|
||||
m_monochromeRGB = Video::MONO_COLOR_DEFAULT;
|
||||
m_fullScreen_ShowSubunitStatus = false;
|
||||
m_RamWorksMemorySize = 0;
|
||||
m_serialPortItem = 0;
|
||||
}
|
||||
@@ -91,10 +95,12 @@ void CConfigNeedingRestart::Reload()
|
||||
|
||||
m_bEnableTheFreezesF8Rom = GetPropertySheet().GetTheFreezesF8Rom();
|
||||
m_uSaveLoadStateMsg = 0;
|
||||
m_masterVolume = SpkrGetVolume();
|
||||
m_videoType = GetVideo().GetVideoType();
|
||||
m_videoStyle = GetVideo().GetVideoStyle();
|
||||
m_videoRefreshRate = GetVideo().GetVideoRefreshRate();
|
||||
m_monochromeRGB = GetVideo().GetMonochromeRGB();
|
||||
m_fullScreen_ShowSubunitStatus = Win32Frame::GetWin32Frame().GetFullScreenShowSubunitStatus();
|
||||
m_RamWorksMemorySize = GetRamWorksMemorySize();
|
||||
|
||||
if (cardManager.IsParallelPrinterCardInstalled())
|
||||
@@ -114,10 +120,12 @@ const CConfigNeedingRestart& CConfigNeedingRestart::operator= (const CConfigNeed
|
||||
m_tfeVirtualDNS = other.m_tfeVirtualDNS;
|
||||
m_bEnableTheFreezesF8Rom = other.m_bEnableTheFreezesF8Rom;
|
||||
m_uSaveLoadStateMsg = other.m_uSaveLoadStateMsg;
|
||||
m_masterVolume = other.m_masterVolume;
|
||||
m_videoType = other.m_videoType;
|
||||
m_videoStyle = other.m_videoStyle;
|
||||
m_videoRefreshRate = other.m_videoRefreshRate;
|
||||
m_monochromeRGB = other.m_monochromeRGB;
|
||||
m_fullScreen_ShowSubunitStatus = other.m_fullScreen_ShowSubunitStatus;
|
||||
m_RamWorksMemorySize = other.m_RamWorksMemorySize;
|
||||
m_parallelPrinterCard = other.m_parallelPrinterCard;
|
||||
m_serialPortItem = other.m_serialPortItem;
|
||||
@@ -134,7 +142,8 @@ const CConfigNeedingRestart& CConfigNeedingRestart::operator= (const CConfigNeed
|
||||
bool CConfigNeedingRestart::operator== (const CConfigNeedingRestart& other) const
|
||||
{
|
||||
// Ignore: (as they don't require the VM to be restarted)
|
||||
// . m_videoType, m_videoStyle, m_monochromeRGB
|
||||
// . m_masterVolume
|
||||
// . m_videoType, m_videoStyle, m_monochromeRGB, m_fullScreen_ShowSubunitStatus
|
||||
|
||||
return m_Apple2Type == other.m_Apple2Type &&
|
||||
m_CpuType == other.m_CpuType &&
|
||||
|
||||
@@ -43,10 +43,12 @@ public:
|
||||
bool m_tfeVirtualDNS;
|
||||
UINT m_bEnableTheFreezesF8Rom;
|
||||
UINT m_uSaveLoadStateMsg;
|
||||
uint32_t m_masterVolume;
|
||||
VideoType_e m_videoType;
|
||||
VideoStyle_e m_videoStyle;
|
||||
VideoRefreshRate_e m_videoRefreshRate;
|
||||
COLORREF m_monochromeRGB;
|
||||
bool m_fullScreen_ShowSubunitStatus;
|
||||
uint32_t m_RamWorksMemorySize; // Size in 64K banks
|
||||
ParallelPrinterCard m_parallelPrinterCard; // Use entire card object, as there are many config vars
|
||||
UINT m_serialPortItem; // SSC: Just one config var for this card (at the moment)
|
||||
|
||||
@@ -212,6 +212,13 @@ void CPageConfig::InitOptions(HWND hWnd)
|
||||
|
||||
//
|
||||
|
||||
SendDlgItemMessage(hWnd, IDC_SLIDER_MASTER_VOLUME, TBM_SETRANGE, TRUE, MAKELONG(VOLUME_MIN, VOLUME_MAX));
|
||||
SendDlgItemMessage(hWnd, IDC_SLIDER_MASTER_VOLUME, TBM_SETPAGESIZE, 0, 10);
|
||||
SendDlgItemMessage(hWnd, IDC_SLIDER_MASTER_VOLUME, TBM_SETTICFREQ, 10, 0);
|
||||
SendDlgItemMessage(hWnd, IDC_SLIDER_MASTER_VOLUME, TBM_SETPOS, TRUE, VOLUME_MAX - m_PropertySheetHelper.GetConfigNew().m_masterVolume); // Invert: L=MIN, R=MAX
|
||||
|
||||
//
|
||||
|
||||
CheckDlgButton(hWnd, IDC_CHECK_CONFIRM_REBOOT, GetFrame().g_bConfirmReboot ? BST_CHECKED : BST_UNCHECKED);
|
||||
|
||||
m_PropertySheetHelper.FillComboBox(hWnd, IDC_VIDEOTYPE, GetVideo().GetVideoChoices(), m_PropertySheetHelper.GetConfigNew().m_videoType);
|
||||
@@ -221,15 +228,7 @@ void CPageConfig::InitOptions(HWND hWnd)
|
||||
EnableWindow(GetDlgItem(hWnd, IDC_CHECK_VERTICAL_BLEND), (m_PropertySheetHelper.GetConfigNew().m_videoType == VT_COLOR_IDEALIZED) ? TRUE : FALSE);
|
||||
CheckDlgButton(hWnd, IDC_CHECK_50HZ_VIDEO, (m_PropertySheetHelper.GetConfigNew().m_videoRefreshRate == VR_50HZ) ? BST_CHECKED : BST_UNCHECKED);
|
||||
|
||||
Win32Frame& win32Frame = Win32Frame::GetWin32Frame();
|
||||
CheckDlgButton(hWnd, IDC_CHECK_FS_SHOW_SUBUNIT_STATUS, win32Frame.GetFullScreenShowSubunitStatus() ? BST_CHECKED : BST_UNCHECKED);
|
||||
|
||||
//
|
||||
|
||||
SendDlgItemMessage(hWnd, IDC_SLIDER_MASTER_VOLUME, TBM_SETRANGE, TRUE, MAKELONG(VOLUME_MIN, VOLUME_MAX));
|
||||
SendDlgItemMessage(hWnd, IDC_SLIDER_MASTER_VOLUME, TBM_SETPAGESIZE, 0, 10);
|
||||
SendDlgItemMessage(hWnd, IDC_SLIDER_MASTER_VOLUME, TBM_SETTICFREQ, 10, 0);
|
||||
SendDlgItemMessage(hWnd, IDC_SLIDER_MASTER_VOLUME, TBM_SETPOS, TRUE, VOLUME_MAX - SpkrGetVolume()); // Invert: L=MIN, R=MAX
|
||||
CheckDlgButton(hWnd, IDC_CHECK_FS_SHOW_SUBUNIT_STATUS, m_PropertySheetHelper.GetConfigNew().m_fullScreen_ShowSubunitStatus ? BST_CHECKED : BST_UNCHECKED);
|
||||
|
||||
//
|
||||
|
||||
@@ -403,10 +402,16 @@ void CPageConfig::ResetAllToDefault(HWND hWnd)
|
||||
m_PropertySheetHelper.GetConfigNew().m_Apple2Type = apple2Type;
|
||||
m_PropertySheetHelper.GetConfigNew().m_CpuType = ProbeMainCpuDefault(apple2Type);
|
||||
|
||||
m_PropertySheetHelper.ResetSlotsToDefault();
|
||||
m_PropertySheetHelper.GetConfigNew().m_masterVolume = kUserVolume_Default;
|
||||
|
||||
m_PropertySheetHelper.GetConfigNew().m_videoType = VT_DEFAULT;
|
||||
m_PropertySheetHelper.GetConfigNew().m_videoStyle = VS_DEFAULT;
|
||||
m_PropertySheetHelper.GetConfigNew().m_videoRefreshRate = VR_DEFAULT;
|
||||
m_PropertySheetHelper.GetConfigNew().m_monochromeRGB = Video::MONO_COLOR_DEFAULT;
|
||||
|
||||
m_PropertySheetHelper.GetConfigNew().m_fullScreen_ShowSubunitStatus = Win32Frame::kFullScreen_ShowSubunitStatus_Default;
|
||||
|
||||
// Slots
|
||||
|
||||
m_PropertySheetHelper.ResetSlotsToDefault();
|
||||
}
|
||||
|
||||
+3
-1
@@ -6,6 +6,8 @@
|
||||
|
||||
#include "SoundBuffer.h"
|
||||
|
||||
const uint32_t kUserVolume_Default = 0; // 0=Max
|
||||
|
||||
struct VOICE
|
||||
{
|
||||
std::shared_ptr<SoundBuffer> lpDSBvoice;
|
||||
@@ -24,7 +26,7 @@ struct VOICE
|
||||
bMute = false;
|
||||
nVolume = DSBVOLUME_MAX;
|
||||
nFadeVolume = 0;
|
||||
dwUserVolume = 0;
|
||||
dwUserVolume = kUserVolume_Default;
|
||||
bIsSpeaker = false;
|
||||
bRecentlyActive = false;
|
||||
name = "";
|
||||
|
||||
@@ -116,7 +116,7 @@ Win32Frame::Win32Frame()
|
||||
g_bAppActive = false;
|
||||
g_bFrameActive = false;
|
||||
g_windowMinimized = false;
|
||||
g_bFullScreen_ShowSubunitStatus = true;
|
||||
g_bFullScreen_ShowSubunitStatus = kFullScreen_ShowSubunitStatus_Default;
|
||||
g_win_fullscreen_offsetx = 0;
|
||||
g_win_fullscreen_offsety = 0;
|
||||
m_bestWidthForFullScreen = 0;
|
||||
|
||||
@@ -81,7 +81,9 @@ public:
|
||||
HDC FrameGetDC();
|
||||
void FrameReleaseDC();
|
||||
|
||||
bool g_bScrollLock_FullSpeed;
|
||||
bool g_bScrollLock_FullSpeed;
|
||||
|
||||
const static bool kFullScreen_ShowSubunitStatus_Default = true;
|
||||
|
||||
private:
|
||||
static BOOL CALLBACK DDEnumProc(LPGUID lpGUID, LPCTSTR lpszDesc, LPCTSTR lpszDrvName, LPVOID lpContext);
|
||||
|
||||
Reference in New Issue
Block a user