diff --git a/Source/Project64/UserInterface.h b/Source/Project64/UserInterface.h index e50f4e398..3ef6f404d 100644 --- a/Source/Project64/UserInterface.h +++ b/Source/Project64/UserInterface.h @@ -16,41 +16,7 @@ #include #include -typedef unsigned char BYTE; -typedef unsigned short WORD; -typedef unsigned long DWORD; -typedef unsigned __int64 QWORD; -typedef void * HANDLE; -typedef const char * LPCSTR; - -struct RECT_STRUCT -{ - long left; - long top; - long right; - long bottom; -}; - -struct WINDOWS_PAINTSTRUCT -{ - HDC hdc; - int fErase; - RECT_STRUCT rcPaint; - int fRestore; - int fIncUpdate; - BYTE rgbReserved[32]; -}; - -#define CALLBACK __stdcall - -class CN64System; - -#ifndef BYPASS_WINDOWS_GUI -#define WINDOWS_UI -// Remove this to test compilation outside of the Windows ATL environment. -#endif - -#include +#include "WTLApp.h" #include "UserInterface/MenuShortCuts.h" #include "UserInterface/RomBrowser.h" #include "UserInterface/GuiClass.h" diff --git a/Source/Project64/UserInterface/NotificationClass.cpp b/Source/Project64/UserInterface/NotificationClass.cpp index cd4caf32d..ea4be7d89 100644 --- a/Source/Project64/UserInterface/NotificationClass.cpp +++ b/Source/Project64/UserInterface/NotificationClass.cpp @@ -199,11 +199,7 @@ void CNotificationImp::RefreshMenu(void) { if (m_hWnd == NULL) { return; } -#if defined(WINDOWS_UI) m_hWnd->RefreshMenu(); -#else - g_Notify->BreakPoint(__FILE__, __LINE__); -#endif } void CNotificationImp::HideRomBrowser(void) @@ -227,11 +223,7 @@ void CNotificationImp::BringToTop(void) { if (m_hWnd == NULL) { return; } -#if defined(WINDOWS_UI) m_hWnd->BringToTop(); -#else - g_Notify->BreakPoint(__FILE__, __LINE__); -#endif } void CNotificationImp::ChangeFullScreen(void) const @@ -258,12 +250,18 @@ void CNotificationImp::BreakPoint(const char * FileName, int LineNumber) } else { - g_BaseSystem->CloseCpu(); + if (g_BaseSystem) + { + g_BaseSystem->CloseCpu(); + } } } else { DisplayError("Fatal Error: Stopping emulation"); - g_BaseSystem->CloseCpu(); + if (g_BaseSystem) + { + g_BaseSystem->CloseCpu(); + } } } \ No newline at end of file diff --git a/Source/Project64/UserInterface/SettingsConfig.cpp b/Source/Project64/UserInterface/SettingsConfig.cpp index 4b5837adf..e7fdc4c44 100644 --- a/Source/Project64/UserInterface/SettingsConfig.cpp +++ b/Source/Project64/UserInterface/SettingsConfig.cpp @@ -1,6 +1,5 @@ #include "stdafx.h" -#ifdef WINDOWS_UI #include "SettingsConfig.h" #include "Settings/SettingsPage.h" #include @@ -341,4 +340,3 @@ void CSettingConfig::BoldChangedPages(HTREEITEM hItem) ::EnableWindow(GetDlgItem(IDC_RESET_ALL), true); } } -#endif