Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Andrea Odetti 2021-01-02 21:09:09 +00:00
commit 57b2c670ab
26 changed files with 67 additions and 67 deletions

View file

@ -12,7 +12,9 @@ extern "C" __declspec(dllexport) LRESULT CALLBACK LowLevelKeyboardProc(
_In_ WPARAM wParam, _In_ WPARAM wParam,
_In_ LPARAM lParam) _In_ LPARAM lParam)
{ {
#ifndef _WIN64
#pragma comment(linker, "/EXPORT:" __FUNCTION__ "=" __FUNCDNAME__) #pragma comment(linker, "/EXPORT:" __FUNCTION__ "=" __FUNCDNAME__)
#endif
if (nCode == HC_ACTION) if (nCode == HC_ACTION)
{ {

View file

@ -37,7 +37,7 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA."; You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.";
static BOOL CALLBACK DlgProcAbout(HWND hWnd, UINT message, WPARAM wparam, LPARAM lparam) static INT_PTR CALLBACK DlgProcAbout(HWND hWnd, UINT message, WPARAM wparam, LPARAM lparam)
{ {
switch (message) switch (message)
{ {

View file

@ -3,7 +3,7 @@
class IPropertySheetPage class IPropertySheetPage
{ {
protected: protected:
virtual BOOL DlgProcInternal(HWND window, UINT message, WPARAM wparam, LPARAM lparam) = 0; virtual INT_PTR DlgProcInternal(HWND window, UINT message, WPARAM wparam, LPARAM lparam) = 0;
virtual void DlgOK(HWND window) = 0; virtual void DlgOK(HWND window) = 0;
virtual void DlgCANCEL(HWND window) = 0; virtual void DlgCANCEL(HWND window) = 0;
}; };

View file

@ -43,13 +43,13 @@ const TCHAR CPageAdvanced::m_CloneChoices[] =
TEXT("Base 64A\0"); // Taiwanese TEXT("Base 64A\0"); // Taiwanese
BOOL CALLBACK CPageAdvanced::DlgProc(HWND hWnd, UINT message, WPARAM wparam, LPARAM lparam) INT_PTR CALLBACK CPageAdvanced::DlgProc(HWND hWnd, UINT message, WPARAM wparam, LPARAM lparam)
{ {
// Switch from static func to our instance // Switch from static func to our instance
return CPageAdvanced::ms_this->DlgProcInternal(hWnd, message, wparam, lparam); return CPageAdvanced::ms_this->DlgProcInternal(hWnd, message, wparam, lparam);
} }
BOOL CPageAdvanced::DlgProcInternal(HWND hWnd, UINT message, WPARAM wparam, LPARAM lparam) INT_PTR CPageAdvanced::DlgProcInternal(HWND hWnd, UINT message, WPARAM wparam, LPARAM lparam)
{ {
switch (message) switch (message)
{ {
@ -65,11 +65,11 @@ BOOL CPageAdvanced::DlgProcInternal(HWND hWnd, UINT message, WPARAM wparam, LPAR
InitOptions(hWnd); InitOptions(hWnd);
break; break;
case PSN_KILLACTIVE: case PSN_KILLACTIVE:
SetWindowLong(hWnd, DWL_MSGRESULT, FALSE); // Changes are valid SetWindowLongPtr(hWnd, DWLP_MSGRESULT, FALSE); // Changes are valid
break; break;
case PSN_APPLY: case PSN_APPLY:
DlgOK(hWnd); DlgOK(hWnd);
SetWindowLong(hWnd, DWL_MSGRESULT, PSNRET_NOERROR); // Changes are valid SetWindowLongPtr(hWnd, DWLP_MSGRESULT, PSNRET_NOERROR); // Changes are valid
break; break;
case PSN_QUERYCANCEL: case PSN_QUERYCANCEL:
// Can use this to ask user to confirm cancel // Can use this to ask user to confirm cancel

View file

@ -18,14 +18,14 @@ public:
} }
virtual ~CPageAdvanced(){} virtual ~CPageAdvanced(){}
static BOOL CALLBACK DlgProc(HWND hWnd, UINT message, WPARAM wparam, LPARAM lparam); static INT_PTR CALLBACK DlgProc(HWND hWnd, UINT message, WPARAM wparam, LPARAM lparam);
UINT GetTheFreezesF8Rom(void){ return m_uTheFreezesF8Rom; } UINT GetTheFreezesF8Rom(void){ return m_uTheFreezesF8Rom; }
void SetTheFreezesF8Rom(UINT uValue){ m_uTheFreezesF8Rom = uValue; } void SetTheFreezesF8Rom(UINT uValue){ m_uTheFreezesF8Rom = uValue; }
protected: protected:
// IPropertySheetPage // IPropertySheetPage
virtual BOOL DlgProcInternal(HWND hWnd, UINT message, WPARAM wparam, LPARAM lparam); virtual INT_PTR DlgProcInternal(HWND hWnd, UINT message, WPARAM wparam, LPARAM lparam);
virtual void DlgOK(HWND hWnd); virtual void DlgOK(HWND hWnd);
virtual void DlgCANCEL(HWND hWnd){} virtual void DlgCANCEL(HWND hWnd){}

View file

@ -44,13 +44,13 @@ const TCHAR CPageConfig::m_ComputerChoices[] =
TEXT("Enhanced Apple //e\0") TEXT("Enhanced Apple //e\0")
TEXT("Clone\0"); TEXT("Clone\0");
BOOL CALLBACK CPageConfig::DlgProc(HWND hWnd, UINT message, WPARAM wparam, LPARAM lparam) INT_PTR CALLBACK CPageConfig::DlgProc(HWND hWnd, UINT message, WPARAM wparam, LPARAM lparam)
{ {
// Switch from static func to our instance // Switch from static func to our instance
return CPageConfig::ms_this->DlgProcInternal(hWnd, message, wparam, lparam); return CPageConfig::ms_this->DlgProcInternal(hWnd, message, wparam, lparam);
} }
BOOL CPageConfig::DlgProcInternal(HWND hWnd, UINT message, WPARAM wparam, LPARAM lparam) INT_PTR CPageConfig::DlgProcInternal(HWND hWnd, UINT message, WPARAM wparam, LPARAM lparam)
{ {
switch (message) switch (message)
{ {
@ -69,12 +69,12 @@ BOOL CPageConfig::DlgProcInternal(HWND hWnd, UINT message, WPARAM wparam, LPARAM
// About to stop being active page // About to stop being active page
{ {
DWORD NewComputerMenuItem = (DWORD) SendDlgItemMessage(hWnd, IDC_COMPUTER, CB_GETCURSEL, 0, 0); DWORD NewComputerMenuItem = (DWORD) SendDlgItemMessage(hWnd, IDC_COMPUTER, CB_GETCURSEL, 0, 0);
SetWindowLong(hWnd, DWL_MSGRESULT, FALSE); // Changes are valid SetWindowLongPtr(hWnd, DWLP_MSGRESULT, FALSE); // Changes are valid
} }
break; break;
case PSN_APPLY: case PSN_APPLY:
DlgOK(hWnd); DlgOK(hWnd);
SetWindowLong(hWnd, DWL_MSGRESULT, PSNRET_NOERROR); // Changes are valid SetWindowLongPtr(hWnd, DWLP_MSGRESULT, PSNRET_NOERROR); // Changes are valid
break; break;
case PSN_QUERYCANCEL: case PSN_QUERYCANCEL:
// Can use this to ask user to confirm cancel // Can use this to ask user to confirm cancel
@ -318,7 +318,7 @@ void CPageConfig::DlgOK(HWND hWnd)
GetVideo().VideoReinitialize(); GetVideo().VideoReinitialize();
if ((g_nAppMode != MODE_LOGO) && (g_nAppMode != MODE_DEBUG)) if ((g_nAppMode != MODE_LOGO) && (g_nAppMode != MODE_DEBUG))
{ {
GetFrame().VideoRedrawScreen(); GetVideo().VideoRedrawScreen();
} }
} }

View file

@ -18,11 +18,11 @@ public:
} }
virtual ~CPageConfig(){} virtual ~CPageConfig(){}
static BOOL CALLBACK DlgProc(HWND hWnd, UINT message, WPARAM wparam, LPARAM lparam); static INT_PTR CALLBACK DlgProc(HWND hWnd, UINT message, WPARAM wparam, LPARAM lparam);
protected: protected:
// IPropertySheetPage // IPropertySheetPage
virtual BOOL DlgProcInternal(HWND hWnd, UINT message, WPARAM wparam, LPARAM lparam); virtual INT_PTR DlgProcInternal(HWND hWnd, UINT message, WPARAM wparam, LPARAM lparam);
virtual void DlgOK(HWND hWnd); virtual void DlgOK(HWND hWnd);
virtual void DlgCANCEL(HWND hWnd){} virtual void DlgCANCEL(HWND hWnd){}

View file

@ -57,13 +57,13 @@ uilib_dialog_group CPageConfigTfe::ms_rightgroup[] =
{0, 0} {0, 0}
}; };
BOOL CALLBACK CPageConfigTfe::DlgProc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) INT_PTR CALLBACK CPageConfigTfe::DlgProc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
{ {
// Switch from static func to our instance // Switch from static func to our instance
return CPageConfigTfe::ms_this->DlgProcInternal(hwnd, msg, wparam, lparam); return CPageConfigTfe::ms_this->DlgProcInternal(hwnd, msg, wparam, lparam);
} }
BOOL CPageConfigTfe::DlgProcInternal(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) INT_PTR CPageConfigTfe::DlgProcInternal(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
{ {
switch (msg) switch (msg)
{ {

View file

@ -12,11 +12,11 @@ public:
} }
virtual ~CPageConfigTfe(){} virtual ~CPageConfigTfe(){}
static BOOL CALLBACK DlgProc(HWND window, UINT message, WPARAM wparam, LPARAM lparam); static INT_PTR CALLBACK DlgProc(HWND window, UINT message, WPARAM wparam, LPARAM lparam);
protected: protected:
// IPropertySheetPage // IPropertySheetPage
virtual BOOL DlgProcInternal(HWND window, UINT message, WPARAM wparam, LPARAM lparam); virtual INT_PTR DlgProcInternal(HWND window, UINT message, WPARAM wparam, LPARAM lparam);
virtual void DlgOK(HWND window); virtual void DlgOK(HWND window);
virtual void DlgCANCEL(HWND window); virtual void DlgCANCEL(HWND window);

View file

@ -46,13 +46,13 @@ const TCHAR CPageDisk::m_defaultHDDOptions[] =
TEXT("Select Hard Disk Image...\0") TEXT("Select Hard Disk Image...\0")
TEXT("Unplug Hard Disk Image\0"); TEXT("Unplug Hard Disk Image\0");
BOOL CALLBACK CPageDisk::DlgProc(HWND hWnd, UINT message, WPARAM wparam, LPARAM lparam) INT_PTR CALLBACK CPageDisk::DlgProc(HWND hWnd, UINT message, WPARAM wparam, LPARAM lparam)
{ {
// Switch from static func to our instance // Switch from static func to our instance
return CPageDisk::ms_this->DlgProcInternal(hWnd, message, wparam, lparam); return CPageDisk::ms_this->DlgProcInternal(hWnd, message, wparam, lparam);
} }
BOOL CPageDisk::DlgProcInternal(HWND hWnd, UINT message, WPARAM wparam, LPARAM lparam) INT_PTR CPageDisk::DlgProcInternal(HWND hWnd, UINT message, WPARAM wparam, LPARAM lparam)
{ {
switch (message) switch (message)
{ {
@ -68,11 +68,11 @@ BOOL CPageDisk::DlgProcInternal(HWND hWnd, UINT message, WPARAM wparam, LPARAM l
InitOptions(hWnd); InitOptions(hWnd);
break; break;
case PSN_KILLACTIVE: case PSN_KILLACTIVE:
SetWindowLong(hWnd, DWL_MSGRESULT, FALSE); // Changes are valid SetWindowLongPtr(hWnd, DWLP_MSGRESULT, FALSE); // Changes are valid
break; break;
case PSN_APPLY: case PSN_APPLY:
DlgOK(hWnd); DlgOK(hWnd);
SetWindowLong(hWnd, DWL_MSGRESULT, PSNRET_NOERROR); // Changes are valid SetWindowLongPtr(hWnd, DWLP_MSGRESULT, PSNRET_NOERROR); // Changes are valid
break; break;
case PSN_QUERYCANCEL: case PSN_QUERYCANCEL:
// Can use this to ask user to confirm cancel // Can use this to ask user to confirm cancel

View file

@ -15,11 +15,11 @@ public:
} }
virtual ~CPageDisk(){} virtual ~CPageDisk(){}
static BOOL CALLBACK DlgProc(HWND hWnd, UINT message, WPARAM wparam, LPARAM lparam); static INT_PTR CALLBACK DlgProc(HWND hWnd, UINT message, WPARAM wparam, LPARAM lparam);
protected: protected:
// IPropertySheetPage // IPropertySheetPage
virtual BOOL DlgProcInternal(HWND hWnd, UINT message, WPARAM wparam, LPARAM lparam); virtual INT_PTR DlgProcInternal(HWND hWnd, UINT message, WPARAM wparam, LPARAM lparam);
virtual void DlgOK(HWND hWnd); virtual void DlgOK(HWND hWnd);
virtual void DlgCANCEL(HWND hWnd){} virtual void DlgCANCEL(HWND hWnd){}

View file

@ -64,13 +64,13 @@ const TCHAR CPageInput::m_szCPMSlotChoice_Unplugged[] = TEXT("Unplugged\0");
const TCHAR CPageInput::m_szCPMSlotChoice_Unavailable[] = TEXT("Unavailable\0"); const TCHAR CPageInput::m_szCPMSlotChoice_Unavailable[] = TEXT("Unavailable\0");
BOOL CALLBACK CPageInput::DlgProc(HWND hWnd, UINT message, WPARAM wparam, LPARAM lparam) INT_PTR CALLBACK CPageInput::DlgProc(HWND hWnd, UINT message, WPARAM wparam, LPARAM lparam)
{ {
// Switch from static func to our instance // Switch from static func to our instance
return CPageInput::ms_this->DlgProcInternal(hWnd, message, wparam, lparam); return CPageInput::ms_this->DlgProcInternal(hWnd, message, wparam, lparam);
} }
BOOL CPageInput::DlgProcInternal(HWND hWnd, UINT message, WPARAM wparam, LPARAM lparam) INT_PTR CPageInput::DlgProcInternal(HWND hWnd, UINT message, WPARAM wparam, LPARAM lparam)
{ {
switch (message) switch (message)
{ {
@ -86,11 +86,11 @@ BOOL CPageInput::DlgProcInternal(HWND hWnd, UINT message, WPARAM wparam, LPARAM
InitOptions(hWnd); InitOptions(hWnd);
break; break;
case PSN_KILLACTIVE: case PSN_KILLACTIVE:
SetWindowLong(hWnd, DWL_MSGRESULT, FALSE); // Changes are valid SetWindowLongPtr(hWnd, DWLP_MSGRESULT, FALSE); // Changes are valid
break; break;
case PSN_APPLY: case PSN_APPLY:
DlgOK(hWnd); DlgOK(hWnd);
SetWindowLong(hWnd, DWL_MSGRESULT, PSNRET_NOERROR); // Changes are valid SetWindowLongPtr(hWnd, DWLP_MSGRESULT, PSNRET_NOERROR); // Changes are valid
break; break;
case PSN_QUERYCANCEL: case PSN_QUERYCANCEL:
// Can use this to ask user to confirm cancel // Can use this to ask user to confirm cancel

View file

@ -25,7 +25,7 @@ public:
} }
virtual ~CPageInput(){} virtual ~CPageInput(){}
static BOOL CALLBACK DlgProc(HWND window, UINT message, WPARAM wparam, LPARAM lparam); static INT_PTR CALLBACK DlgProc(HWND window, UINT message, WPARAM wparam, LPARAM lparam);
UINT GetScrollLockToggle(void){ return m_uScrollLockToggle; } UINT GetScrollLockToggle(void){ return m_uScrollLockToggle; }
void SetScrollLockToggle(UINT uValue){ m_uScrollLockToggle = uValue; } void SetScrollLockToggle(UINT uValue){ m_uScrollLockToggle = uValue; }
@ -44,7 +44,7 @@ public:
protected: protected:
// IPropertySheetPage // IPropertySheetPage
virtual BOOL DlgProcInternal(HWND hWnd, UINT message, WPARAM wparam, LPARAM lparam); virtual INT_PTR DlgProcInternal(HWND hWnd, UINT message, WPARAM wparam, LPARAM lparam);
virtual void DlgOK(HWND hWnd); virtual void DlgOK(HWND hWnd);
virtual void DlgCANCEL(HWND hWnd){} virtual void DlgCANCEL(HWND hWnd){}

View file

@ -40,13 +40,13 @@ const TCHAR CPageSound::m_soundchoices[] = TEXT("Disabled\0")
TEXT("Sound Card\0"); TEXT("Sound Card\0");
BOOL CALLBACK CPageSound::DlgProc(HWND hWnd, UINT message, WPARAM wparam, LPARAM lparam) INT_PTR CALLBACK CPageSound::DlgProc(HWND hWnd, UINT message, WPARAM wparam, LPARAM lparam)
{ {
// Switch from static func to our instance // Switch from static func to our instance
return CPageSound::ms_this->DlgProcInternal(hWnd, message, wparam, lparam); return CPageSound::ms_this->DlgProcInternal(hWnd, message, wparam, lparam);
} }
BOOL CPageSound::DlgProcInternal(HWND hWnd, UINT message, WPARAM wparam, LPARAM lparam) INT_PTR CPageSound::DlgProcInternal(HWND hWnd, UINT message, WPARAM wparam, LPARAM lparam)
{ {
switch (message) switch (message)
{ {
@ -62,11 +62,11 @@ BOOL CPageSound::DlgProcInternal(HWND hWnd, UINT message, WPARAM wparam, LPARAM
InitOptions(hWnd); InitOptions(hWnd);
break; break;
case PSN_KILLACTIVE: case PSN_KILLACTIVE:
SetWindowLong(hWnd, DWL_MSGRESULT, FALSE); // Changes are valid SetWindowLongPtr(hWnd, DWLP_MSGRESULT, FALSE); // Changes are valid
break; break;
case PSN_APPLY: case PSN_APPLY:
DlgOK(hWnd); DlgOK(hWnd);
SetWindowLong(hWnd, DWL_MSGRESULT, PSNRET_NOERROR); // Changes are valid SetWindowLongPtr(hWnd, DWLP_MSGRESULT, PSNRET_NOERROR); // Changes are valid
break; break;
case PSN_QUERYCANCEL: case PSN_QUERYCANCEL:
// Can use this to ask user to confirm cancel // Can use this to ask user to confirm cancel

View file

@ -19,13 +19,13 @@ public:
} }
virtual ~CPageSound(){} virtual ~CPageSound(){}
static BOOL CALLBACK DlgProc(HWND hWnd, UINT message, WPARAM wparam, LPARAM lparam); static INT_PTR CALLBACK DlgProc(HWND hWnd, UINT message, WPARAM wparam, LPARAM lparam);
DWORD GetVolumeMax(void){ return VOLUME_MAX; } DWORD GetVolumeMax(void){ return VOLUME_MAX; }
protected: protected:
// IPropertySheetPage // IPropertySheetPage
virtual BOOL DlgProcInternal(HWND hWnd, UINT message, WPARAM wparam, LPARAM lparam); virtual INT_PTR DlgProcInternal(HWND hWnd, UINT message, WPARAM wparam, LPARAM lparam);
virtual void DlgOK(HWND hWnd); virtual void DlgOK(HWND hWnd);
virtual void DlgCANCEL(HWND hWnd){} virtual void DlgCANCEL(HWND hWnd){}

View file

@ -43,31 +43,31 @@ void CPropertySheet::Init(void)
PropSheetPages[PG_CONFIG].dwFlags = PSP_DEFAULT; PropSheetPages[PG_CONFIG].dwFlags = PSP_DEFAULT;
PropSheetPages[PG_CONFIG].hInstance = GetFrame().g_hInstance; PropSheetPages[PG_CONFIG].hInstance = GetFrame().g_hInstance;
PropSheetPages[PG_CONFIG].pszTemplate = MAKEINTRESOURCE(IDD_PROPPAGE_CONFIG); PropSheetPages[PG_CONFIG].pszTemplate = MAKEINTRESOURCE(IDD_PROPPAGE_CONFIG);
PropSheetPages[PG_CONFIG].pfnDlgProc = (DLGPROC)CPageConfig::DlgProc; PropSheetPages[PG_CONFIG].pfnDlgProc = CPageConfig::DlgProc;
PropSheetPages[PG_INPUT].dwSize = sizeof(PROPSHEETPAGE); PropSheetPages[PG_INPUT].dwSize = sizeof(PROPSHEETPAGE);
PropSheetPages[PG_INPUT].dwFlags = PSP_DEFAULT; PropSheetPages[PG_INPUT].dwFlags = PSP_DEFAULT;
PropSheetPages[PG_INPUT].hInstance = GetFrame().g_hInstance; PropSheetPages[PG_INPUT].hInstance = GetFrame().g_hInstance;
PropSheetPages[PG_INPUT].pszTemplate = MAKEINTRESOURCE(IDD_PROPPAGE_INPUT); PropSheetPages[PG_INPUT].pszTemplate = MAKEINTRESOURCE(IDD_PROPPAGE_INPUT);
PropSheetPages[PG_INPUT].pfnDlgProc = (DLGPROC)CPageInput::DlgProc; PropSheetPages[PG_INPUT].pfnDlgProc = CPageInput::DlgProc;
PropSheetPages[PG_SOUND].dwSize = sizeof(PROPSHEETPAGE); PropSheetPages[PG_SOUND].dwSize = sizeof(PROPSHEETPAGE);
PropSheetPages[PG_SOUND].dwFlags = PSP_DEFAULT; PropSheetPages[PG_SOUND].dwFlags = PSP_DEFAULT;
PropSheetPages[PG_SOUND].hInstance = GetFrame().g_hInstance; PropSheetPages[PG_SOUND].hInstance = GetFrame().g_hInstance;
PropSheetPages[PG_SOUND].pszTemplate = MAKEINTRESOURCE(IDD_PROPPAGE_SOUND); PropSheetPages[PG_SOUND].pszTemplate = MAKEINTRESOURCE(IDD_PROPPAGE_SOUND);
PropSheetPages[PG_SOUND].pfnDlgProc = (DLGPROC)CPageSound::DlgProc; PropSheetPages[PG_SOUND].pfnDlgProc = CPageSound::DlgProc;
PropSheetPages[PG_DISK].dwSize = sizeof(PROPSHEETPAGE); PropSheetPages[PG_DISK].dwSize = sizeof(PROPSHEETPAGE);
PropSheetPages[PG_DISK].dwFlags = PSP_DEFAULT; PropSheetPages[PG_DISK].dwFlags = PSP_DEFAULT;
PropSheetPages[PG_DISK].hInstance = GetFrame().g_hInstance; PropSheetPages[PG_DISK].hInstance = GetFrame().g_hInstance;
PropSheetPages[PG_DISK].pszTemplate = MAKEINTRESOURCE(IDD_PROPPAGE_DISK); PropSheetPages[PG_DISK].pszTemplate = MAKEINTRESOURCE(IDD_PROPPAGE_DISK);
PropSheetPages[PG_DISK].pfnDlgProc = (DLGPROC)CPageDisk::DlgProc; PropSheetPages[PG_DISK].pfnDlgProc = CPageDisk::DlgProc;
PropSheetPages[PG_ADVANCED].dwSize = sizeof(PROPSHEETPAGE); PropSheetPages[PG_ADVANCED].dwSize = sizeof(PROPSHEETPAGE);
PropSheetPages[PG_ADVANCED].dwFlags = PSP_DEFAULT; PropSheetPages[PG_ADVANCED].dwFlags = PSP_DEFAULT;
PropSheetPages[PG_ADVANCED].hInstance = GetFrame().g_hInstance; PropSheetPages[PG_ADVANCED].hInstance = GetFrame().g_hInstance;
PropSheetPages[PG_ADVANCED].pszTemplate = MAKEINTRESOURCE(IDD_PROPPAGE_ADVANCED); PropSheetPages[PG_ADVANCED].pszTemplate = MAKEINTRESOURCE(IDD_PROPPAGE_ADVANCED);
PropSheetPages[PG_ADVANCED].pfnDlgProc = (DLGPROC)CPageAdvanced::DlgProc; PropSheetPages[PG_ADVANCED].pfnDlgProc = CPageAdvanced::DlgProc;
PROPSHEETHEADER PropSheetHeader; PROPSHEETHEADER PropSheetHeader;

View file

@ -754,7 +754,7 @@ Update_t CmdBenchmarkStop (int nArgs)
DebugEnd(); DebugEnd();
GetFrame().FrameRefreshStatus(DRAW_TITLE); GetFrame().FrameRefreshStatus(DRAW_TITLE);
GetFrame().VideoRedrawScreen(); GetVideo().VideoRedrawScreen();
DWORD currtime = GetTickCount(); DWORD currtime = GetTickCount();
while ((extbench = GetTickCount()) != currtime) while ((extbench = GetTickCount()) != currtime)
; // intentional busy-waiting ; // intentional busy-waiting
@ -7447,7 +7447,7 @@ Update_t CmdWindowViewData (int nArgs)
//=========================================================================== //===========================================================================
Update_t CmdWindowViewOutput (int nArgs) Update_t CmdWindowViewOutput (int nArgs)
{ {
GetFrame().VideoRedrawScreen(); GetVideo().VideoRedrawScreen();
DebugVideoMode::Instance().Set( GetVideo().GetVideoMode() ); DebugVideoMode::Instance().Set( GetVideo().GetVideoMode() );

View file

@ -1,7 +1,6 @@
#include "StdAfx.h" #include "StdAfx.h"
#include "FrameBase.h" #include "FrameBase.h"
#include "Interface.h"
FrameBase::FrameBase() FrameBase::FrameBase()
{ {
@ -16,9 +15,3 @@ FrameBase::~FrameBase()
{ {
} }
void FrameBase::VideoRedrawScreen(void)
{
// NB. Can't rely on g_uVideoMode being non-zero (ie. so it can double up as a flag) since 'GR,PAGE1,non-mixed' mode == 0x00.
GetVideo().VideoRefreshScreen(GetVideo().GetVideoMode(), true);
}

View file

@ -13,8 +13,6 @@ public:
BOOL g_bMultiMon; BOOL g_bMultiMon;
bool g_bFreshReset; bool g_bFreshReset;
void VideoRedrawScreen();
virtual void FrameDrawDiskLEDS(HDC hdc) = 0; virtual void FrameDrawDiskLEDS(HDC hdc) = 0;
virtual void FrameDrawDiskStatus(HDC hdc) = 0; virtual void FrameDrawDiskStatus(HDC hdc) = 0;
virtual void FrameRefreshStatus(int, bool bUpdateDiskStatus = true) = 0; virtual void FrameRefreshStatus(int, bool bUpdateDiskStatus = true) = 0;

View file

@ -303,7 +303,7 @@ void KeybQueueKeypress (WPARAM key, Keystroke_e bASCII)
{ {
g_bTK3KModeKey = (GetKeyState(VK_SCROLL) & 1) ? true : false; // Sync with the Scroll Lock status g_bTK3KModeKey = (GetKeyState(VK_SCROLL) & 1) ? true : false; // Sync with the Scroll Lock status
GetFrame().FrameRefreshStatus(DRAW_LEDS); // TODO: Implement |Mode| LED in the UI; make it appear only when in TK3000 mode GetFrame().FrameRefreshStatus(DRAW_LEDS); // TODO: Implement |Mode| LED in the UI; make it appear only when in TK3000 mode
GetFrame().VideoRedrawScreen(); // TODO: Still need to implement page mode switching and 'whatnot' GetVideo().VideoRedrawScreen(); // TODO: Still need to implement page mode switching and 'whatnot'
} }
return; return;
} }

View file

@ -97,7 +97,7 @@ static void Spkr_DSUninit();
static void DisplayBenchmarkResults () static void DisplayBenchmarkResults ()
{ {
DWORD totaltime = GetTickCount()-extbench; DWORD totaltime = GetTickCount()-extbench;
GetFrame().VideoRedrawScreen(); GetVideo().VideoRedrawScreen();
TCHAR buffer[64]; TCHAR buffer[64];
wsprintf(buffer, wsprintf(buffer,
TEXT("This benchmark took %u.%02u seconds."), TEXT("This benchmark took %u.%02u seconds."),

View file

@ -505,7 +505,7 @@ int tfe_activate_i(void)
#ifdef TFE_DEBUG_INIT #ifdef TFE_DEBUG_INIT
if(g_fh) fprintf(g_fh, "tfe_activate: Allocated memory successfully.\n"); if(g_fh) fprintf(g_fh, "tfe_activate: Allocated memory successfully.\n");
if(g_fh) fprintf(g_fh, "\ttfe at $%08X, tfe_packetpage at $%08X\n", uintptr_t(tfe), uintptr_t(tfe_packetpage) ); if(g_fh) fprintf(g_fh, "\ttfe at $%08llX, tfe_packetpage at $%08llX\n", (unsigned long long)uintptr_t(tfe), (unsigned long long)uintptr_t(tfe_packetpage) );
#endif #endif
#ifdef DOS_TFE #ifdef DOS_TFE
@ -1361,7 +1361,7 @@ int set_tfe_enabled(void *v, void *param)
{ {
if (!tfe_cannot_use) { if (!tfe_cannot_use) {
if (!(int)v) { if (!v) {
/* TFE should be deactived */ /* TFE should be deactived */
if (tfe_enabled) { if (tfe_enabled) {
tfe_enabled = 0; tfe_enabled = 0;

View file

@ -852,7 +852,7 @@ void Video::VideoRedrawScreenDuringFullSpeed(DWORD dwCyclesThisFrame, bool bInit
void Video::VideoRedrawScreenAfterFullSpeed(DWORD dwCyclesThisFrame) void Video::VideoRedrawScreenAfterFullSpeed(DWORD dwCyclesThisFrame)
{ {
NTSC_VideoClockResync(dwCyclesThisFrame); NTSC_VideoClockResync(dwCyclesThisFrame);
GetFrame().VideoRedrawScreen(); // Better (no flicker) than using: NTSC_VideoReinitialize() or VideoReinitialize() VideoRedrawScreen(); // Better (no flicker) than using: NTSC_VideoReinitialize() or VideoReinitialize()
} }
void Video::Video_RedrawAndTakeScreenShot(const char* pScreenshotFilename) void Video::Video_RedrawAndTakeScreenShot(const char* pScreenshotFilename)
@ -861,7 +861,7 @@ void Video::Video_RedrawAndTakeScreenShot(const char* pScreenshotFilename)
if (!pScreenshotFilename) if (!pScreenshotFilename)
return; return;
GetFrame().VideoRedrawScreen(); VideoRedrawScreen();
Video_SaveScreenShot(SCREENSHOT_560x384, pScreenshotFilename); Video_SaveScreenShot(SCREENSHOT_560x384, pScreenshotFilename);
} }
@ -884,3 +884,9 @@ void Video::VideoRefreshScreen(uint32_t uRedrawWholeScreenVideoMode, bool bRedra
VideoPresentScreen(); VideoPresentScreen();
} }
void Video::VideoRedrawScreen(void)
{
// NB. Can't rely on g_uVideoMode being non-zero (ie. so it can double up as a flag) since 'GR,PAGE1,non-mixed' mode == 0x00.
VideoRefreshScreen(GetVideoMode(), true);
}

View file

@ -219,6 +219,7 @@ public:
void VideoRedrawScreenDuringFullSpeed(DWORD dwCyclesThisFrame, bool bInit = false); void VideoRedrawScreenDuringFullSpeed(DWORD dwCyclesThisFrame, bool bInit = false);
void VideoRedrawScreenAfterFullSpeed(DWORD dwCyclesThisFrame); void VideoRedrawScreenAfterFullSpeed(DWORD dwCyclesThisFrame);
void Video_RedrawAndTakeScreenShot(const char* pScreenshotFilename); void Video_RedrawAndTakeScreenShot(const char* pScreenshotFilename);
void VideoRedrawScreen(void);
uint8_t* GetFrameBuffer(void) { return g_pFramebufferbits; } uint8_t* GetFrameBuffer(void) { return g_pFramebufferbits; }
void SetFrameBuffer(uint8_t* frameBuffer) { g_pFramebufferbits = frameBuffer; } void SetFrameBuffer(uint8_t* frameBuffer) { g_pFramebufferbits = frameBuffer; }

View file

@ -589,7 +589,7 @@ static void DrawFrameWindow (bool bPaintingWindow/*=false*/)
else if (g_nAppMode == MODE_DEBUG) else if (g_nAppMode == MODE_DEBUG)
DebugDisplay(); DebugDisplay();
else else
GetFrame().VideoRedrawScreen(); GetVideo().VideoRedrawScreen();
if (bPaintingWindow) if (bPaintingWindow)
EndPaint(GetFrame().g_hFrameWindow,&ps); EndPaint(GetFrame().g_hFrameWindow,&ps);
@ -1322,7 +1322,7 @@ LRESULT CALLBACK FrameWndProc (
} }
DrawStatusArea((HDC)0,DRAW_TITLE); DrawStatusArea((HDC)0,DRAW_TITLE);
if ((g_nAppMode != MODE_LOGO) && (g_nAppMode != MODE_DEBUG)) if ((g_nAppMode != MODE_LOGO) && (g_nAppMode != MODE_DEBUG))
GetFrame().VideoRedrawScreen(); GetVideo().VideoRedrawScreen();
} }
else if ((wparam == VK_SCROLL) && GetPropertySheet().GetScrollLockToggle()) else if ((wparam == VK_SCROLL) && GetPropertySheet().GetScrollLockToggle())
{ {
@ -2005,7 +2005,7 @@ static void ProcessButtonClick(int button, bool bFromButtonUI /*=false*/)
} }
DrawStatusArea((HDC)0,DRAW_TITLE); DrawStatusArea((HDC)0,DRAW_TITLE);
GetFrame().VideoRedrawScreen(); GetVideo().VideoRedrawScreen();
break; break;
case BTN_DRIVE1: case BTN_DRIVE1:

View file

@ -151,7 +151,7 @@ void WinVideo::Benchmark(void)
SetVideoMode(VF_TEXT); SetVideoMode(VF_TEXT);
memset(mem+0x400,0x14,0x400); memset(mem+0x400,0x14,0x400);
GetFrame().VideoRedrawScreen(); VideoRedrawScreen();
DWORD milliseconds = GetTickCount(); DWORD milliseconds = GetTickCount();
while (GetTickCount() == milliseconds) ; while (GetTickCount() == milliseconds) ;
milliseconds = GetTickCount(); milliseconds = GetTickCount();
@ -173,7 +173,7 @@ void WinVideo::Benchmark(void)
DWORD totalhiresfps = 0; DWORD totalhiresfps = 0;
SetVideoMode(VF_HIRES); SetVideoMode(VF_HIRES);
memset(mem+0x2000,0x14,0x2000); memset(mem+0x2000,0x14,0x2000);
GetFrame().VideoRedrawScreen(); VideoRedrawScreen();
milliseconds = GetTickCount(); milliseconds = GetTickCount();
while (GetTickCount() == milliseconds) ; while (GetTickCount() == milliseconds) ;
milliseconds = GetTickCount(); milliseconds = GetTickCount();
@ -257,7 +257,7 @@ void WinVideo::Benchmark(void)
// THE SAME TIME // THE SAME TIME
DWORD realisticfps = 0; DWORD realisticfps = 0;
memset(mem+0x2000,0xAA,0x2000); memset(mem+0x2000,0xAA,0x2000);
GetFrame().VideoRedrawScreen(); VideoRedrawScreen();
milliseconds = GetTickCount(); milliseconds = GetTickCount();
while (GetTickCount() == milliseconds) ; while (GetTickCount() == milliseconds) ;
milliseconds = GetTickCount(); milliseconds = GetTickCount();
@ -276,7 +276,7 @@ void WinVideo::Benchmark(void)
memset(mem+0x2000,0xAA,0x2000); memset(mem+0x2000,0xAA,0x2000);
else else
memcpy(mem+0x2000,mem+((cycle & 2) ? 0x4000 : 0x6000),0x2000); memcpy(mem+0x2000,mem+((cycle & 2) ? 0x4000 : 0x6000),0x2000);
GetFrame().VideoRedrawScreen(); VideoRedrawScreen();
if (cycle++ >= 3) if (cycle++ >= 3)
cycle = 0; cycle = 0;
realisticfps++; realisticfps++;
@ -320,7 +320,7 @@ void WinVideo::ChooseMonochromeColor(void)
VideoReinitialize(); VideoReinitialize();
if ((g_nAppMode != MODE_LOGO) && (g_nAppMode != MODE_DEBUG)) if ((g_nAppMode != MODE_LOGO) && (g_nAppMode != MODE_DEBUG))
{ {
GetFrame().VideoRedrawScreen(); VideoRedrawScreen();
} }
Config_Save_Video(); Config_Save_Video();
} }