Merge pull request #520 from learn-more/gdi_cc

gdi_native: Fix calling convention problem
This commit is contained in:
dumblob 2022-11-30 21:48:17 +01:00 committed by GitHub
commit 776893ef7b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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);