gdi_native: Fix calling convention problem

The calling convention of a WNDPROC is specified as being 'CALLBACK'.
This commit is contained in:
Mark Jansen 2022-11-30 18:46:56 +01:00
parent 7ae6d7dacc
commit b98732fbc8
No known key found for this signature in database
GPG Key ID: B39240EE84BEAE8B
1 changed files with 9 additions and 9 deletions

View File

@ -70,9 +70,9 @@ void nkgdi_window_destroy(struct nkgdi_window* wnd);
/* Predeclare the windows window message procs */
/* This proc will setup the pointer to the window context */
LRESULT nkgdi_window_proc_setup(HWND wnd, UINT msg, WPARAM wParam, LPARAM lParam);
LRESULT CALLBACK nkgdi_window_proc_setup(HWND wnd, UINT msg, WPARAM wParam, LPARAM lParam);
/* This proc will take the window context pointer and performs operations on it*/
LRESULT nkgdi_window_proc_run(HWND wnd, UINT msg, WPARAM wParam, LPARAM lParam);
LRESULT CALLBACK nkgdi_window_proc_run(HWND wnd, UINT msg, WPARAM wParam, LPARAM lParam);
void nkgdi_window_init(void)
{
@ -232,7 +232,7 @@ int nkgdi_window_update(struct nkgdi_window* wnd)
return wnd->_internal.is_open;
}
LRESULT nkgdi_window_proc_setup(HWND wnd, UINT msg, WPARAM wParam, LPARAM lParam)
LRESULT CALLBACK nkgdi_window_proc_setup(HWND wnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
/* Waiting to receive the NCCREATE message with the custom window data */
if (msg == WM_NCCREATE)
@ -253,7 +253,7 @@ LRESULT nkgdi_window_proc_setup(HWND wnd, UINT msg, WPARAM wParam, LPARAM lParam
return DefWindowProc(wnd, msg, wParam, lParam);
}
LRESULT nkgdi_window_proc_run(HWND wnd, UINT msg, WPARAM wParam, LPARAM lParam)
LRESULT CALLBACK nkgdi_window_proc_run(HWND wnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
/* The window context is extracted from the window data */
struct nkgdi_window* nkwnd = (struct nkgdi_window*)GetWindowLongPtrW(wnd, GWLP_USERDATA);