diff options
Diffstat (limited to '')
-rw-r--r-- | src/skel/crossplatform.h | 10 | ||||
-rw-r--r-- | src/skel/win/win.cpp | 55 | ||||
-rw-r--r-- | src/skel/win/win.h | 3 |
3 files changed, 30 insertions, 38 deletions
diff --git a/src/skel/crossplatform.h b/src/skel/crossplatform.h index 066570be..268eedff 100644 --- a/src/skel/crossplatform.h +++ b/src/skel/crossplatform.h @@ -14,14 +14,10 @@ enum eWinVersion #ifdef _WIN32 -// As long as WITHWINDOWS isn't defined / <Windows.h> isn't included, include <windef.h>, which is lighter. +// As long as WITHWINDOWS isn't defined / <Windows.h> isn't included, we only need type definitions so let's include <IntSafe.h>. +// NOTE: It's perfectly fine to include <Windows.h> here, but it can increase build size and time in *some* conditions, and maybe substantially in future if we'll use crossplatform.h more. #ifndef _INC_WINDOWS - #ifdef _WIN64 - #define _ARM64_ - #else - #define _X86_ - #endif - #include <windef.h> + #include <IntSafe.h> #endif #if defined RW_D3D9 || defined RWLIBS #include "win.h" diff --git a/src/skel/win/win.cpp b/src/skel/win/win.cpp index a2673ccb..75a3a7c9 100644 --- a/src/skel/win/win.cpp +++ b/src/skel/win/win.cpp @@ -316,34 +316,6 @@ psNativeTextureSupport(void) /* ***************************************************************************** */ -static BOOL -InitApplication(HANDLE instance) -{ - /* - * Perform any necessary MS Windows application initialization. Basically, - * this means registering the window class for this application. - */ - - WNDCLASS windowClass; - - windowClass.style = CS_BYTEALIGNWINDOW; - windowClass.lpfnWndProc = (WNDPROC) MainWndProc; - windowClass.cbClsExtra = 0; - windowClass.cbWndExtra = 0; - windowClass.hInstance = (HINSTANCE)instance; - windowClass.hIcon = nil; - windowClass.hCursor = LoadCursor(nil, IDC_ARROW); - windowClass.hbrBackground = nil; - windowClass.lpszMenuName = NULL; - windowClass.lpszClassName = AppClassName; - - return RegisterClass(&windowClass); -} - - -/* - ***************************************************************************** - */ static HWND InitInstance(HANDLE instance) { @@ -1305,6 +1277,33 @@ MainWndProc(HWND window, UINT message, WPARAM wParam, LPARAM lParam) return DefWindowProc(window, message, wParam, lParam); } +/* + ***************************************************************************** + */ +static BOOL +InitApplication(HANDLE instance) +{ + /* + * Perform any necessary MS Windows application initialization. Basically, + * this means registering the window class for this application. + */ + + WNDCLASS windowClass; + + windowClass.style = CS_BYTEALIGNWINDOW; + windowClass.lpfnWndProc = (WNDPROC)MainWndProc; + windowClass.cbClsExtra = 0; + windowClass.cbWndExtra = 0; + windowClass.hInstance = (HINSTANCE)instance; + windowClass.hIcon = nil; + windowClass.hCursor = LoadCursor(nil, IDC_ARROW); + windowClass.hbrBackground = nil; + windowClass.lpszMenuName = NULL; + windowClass.lpszClassName = AppClassName; + + return RegisterClass(&windowClass); +} + /* ***************************************************************************** diff --git a/src/skel/win/win.h b/src/skel/win/win.h index 4b2001f8..be840898 100644 --- a/src/skel/win/win.h +++ b/src/skel/win/win.h @@ -68,9 +68,6 @@ extern "C" { #endif /* __cplusplus */ -extern LRESULT CALLBACK -MainWndProc(HWND window, UINT message, WPARAM wParam, LPARAM lParam); - #ifdef __DINPUT_INCLUDED__ HRESULT _InputInitialise(); HRESULT CapturePad(RwInt32 padID); |