Use macros instead of __stdcall

Wow Microsoft's documentation sucks: it constantly omits these,
making you think they're just plain `__cdecl`.
This commit is contained in:
Clownacy 2020-03-14 13:22:36 +00:00
parent 4e0a168533
commit 8a3b5c1f7a
4 changed files with 13 additions and 13 deletions

View file

@ -17,7 +17,7 @@ static const char *version_string =
; ;
// TODO - Inaccurate stack frame // TODO - Inaccurate stack frame
INT_PTR __stdcall VersionDialog(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) INT_PTR CALLBACK VersionDialog(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
{ {
char string_buffer[104]; char string_buffer[104];
@ -58,7 +58,7 @@ INT_PTR __stdcall VersionDialog(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lPara
return FALSE; return FALSE;
} }
INT_PTR __stdcall DebugMuteDialog(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) INT_PTR CALLBACK DebugMuteDialog(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
{ {
(void)lParam; (void)lParam;
@ -102,7 +102,7 @@ INT_PTR __stdcall DebugMuteDialog(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lPa
return FALSE; return FALSE;
} }
INT_PTR __stdcall DebugSaveDialog(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) INT_PTR CALLBACK DebugSaveDialog(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
{ {
char string[100]; char string[100];
@ -135,7 +135,7 @@ INT_PTR __stdcall DebugSaveDialog(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lPa
return FALSE; return FALSE;
} }
INT_PTR __stdcall QuitDialog(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) INT_PTR CALLBACK QuitDialog(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
{ {
switch (Msg) switch (Msg)
{ {

View file

@ -2,7 +2,7 @@
#include "WindowsWrapper.h" #include "WindowsWrapper.h"
INT_PTR __stdcall VersionDialog(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); INT_PTR CALLBACK VersionDialog(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam);
INT_PTR __stdcall DebugMuteDialog(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); INT_PTR CALLBACK DebugMuteDialog(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam);
INT_PTR __stdcall DebugSaveDialog(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); INT_PTR CALLBACK DebugSaveDialog(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam);
INT_PTR __stdcall QuitDialog(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); INT_PTR CALLBACK QuitDialog(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam);

View file

@ -59,7 +59,7 @@ BOOL SetDeviceAquire(BOOL aquire)
// It looks like Pixel declared his functions early, so he could forward-reference // It looks like Pixel declared his functions early, so he could forward-reference
BOOL FindAndOpenDirectInputDevice(HWND hWnd); BOOL FindAndOpenDirectInputDevice(HWND hWnd);
BOOL __stdcall EnumDevices_Callback(LPCDIDEVICEINSTANCE lpddi, LPVOID pvRef); BOOL CALLBACK EnumDevices_Callback(LPCDIDEVICEINSTANCE lpddi, LPVOID pvRef);
BOOL InitDirectInput(HINSTANCE hinst, HWND hWnd) BOOL InitDirectInput(HINSTANCE hinst, HWND hWnd)
{ {
@ -116,7 +116,7 @@ BOOL FindAndOpenDirectInputDevice(HWND hWnd)
} }
// The original names for this function and its variables are unknown // The original names for this function and its variables are unknown
BOOL __stdcall EnumDevices_Callback(LPCDIDEVICEINSTANCE lpddi, LPVOID pvRef) BOOL CALLBACK EnumDevices_Callback(LPCDIDEVICEINSTANCE lpddi, LPVOID pvRef)
{ {
static int already_ran; static int already_ran;
static DirectInputPair *directinput_objects; static DirectInputPair *directinput_objects;

View file

@ -22,7 +22,7 @@
#include "Sound.h" #include "Sound.h"
#include "Triangle.h" #include "Triangle.h"
LRESULT __stdcall WindowProcedure(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); LRESULT CALLBACK WindowProcedure(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam);
char gModulePath[MAX_PATH]; char gModulePath[MAX_PATH];
char gDataPath[MAX_PATH]; char gDataPath[MAX_PATH];
@ -97,7 +97,7 @@ unsigned long GetFramePerSecound(void)
} }
// TODO - Inaccurate stack frame // TODO - Inaccurate stack frame
int __stdcall WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd) int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd)
{ {
(void)hPrevInstance; (void)hPrevInstance;
(void)lpCmdLine; (void)lpCmdLine;
@ -441,7 +441,7 @@ BOOL DragAndDropHandler(HWND hWnd, WPARAM wParam)
} }
// TODO - Inaccurate stack frame // TODO - Inaccurate stack frame
LRESULT __stdcall WindowProcedure(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) LRESULT CALLBACK WindowProcedure(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
{ {
BOOL window_focus; BOOL window_focus;
HMENU hMenu; HMENU hMenu;