Skip to content

Commit

Permalink
attempt number 1
Browse files Browse the repository at this point in the history
  • Loading branch information
itsmattkc committed Nov 4, 2023
1 parent 4c6f058 commit 0f311ba
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ int WINAPI WinMain(
}

ShowWindow(wnd, nShowCmd);
SetCursor(NULL);

if (!CxbxrExec(wnd, cxbxPath, xbePath)) {
return 0;
Expand Down
5 changes: 5 additions & 0 deletions src/wndproc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ LRESULT WINAPI MainWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)

HANDLE remoteThread = CreateRemoteThread(g_cxbxHandle, NULL, 0, (LPTHREAD_START_ROUTINE) loadLibraryFunc, remoteMem, NULL, NULL);
CloseHandle(remoteThread);

LPVOID setCursorFunc = (LPVOID) GetProcAddress(GetModuleHandle(TEXT("user32.dll")), "SetCursor");
DWORD nullCursor = 0;
HANDLE cursorThread = CreateRemoteThread(g_cxbxHandle, NULL, 0, (LPTHREAD_START_ROUTINE) setCursorFunc, &nullCursor, NULL, NULL);
CloseHandle(cursorThread);
return 0;
}
break;
Expand Down

0 comments on commit 0f311ba

Please sign in to comment.