Reverted this part of r934:

. Moved DIMouse::DirectInputInit() from WM_CREATE to main init-loop (just before msg-pump)
This commit is contained in:
tomch 2013-04-21 21:31:12 +00:00
parent 28b52edf68
commit f293e4ee1f
2 changed files with 5 additions and 10 deletions

View File

@ -999,12 +999,6 @@ int APIENTRY WinMain(HINSTANCE passinstance, HINSTANCE, LPSTR lpCmdLine, int)
tfe_init();
LogFileOutput("Main: tfe_init()\n");
if (g_Slot4 == CT_MouseInterface) // TODO: Check all slots for MouseInterface card
{
DIMouse::DirectInputInit(g_hFrameWindow);
LogFileOutput("Main: DIMouse::DirectInputInit()\n");
}
Snapshot_Startup(); // Do this after everything has been init'ed
LogFileOutput("Main: Snapshot_Startup()\n");

View File

@ -750,8 +750,8 @@ LRESULT CALLBACK FrameWndProc (
DSInit();
LogFileOutput("WM_CREATE: DSInit()\n");
// DIMouse::DirectInputInit(window);
// LogFileOutput("WM_CREATE: DIMouse::DirectInputInit()\n");
DIMouse::DirectInputInit(window);
LogFileOutput("WM_CREATE: DIMouse::DirectInputInit()\n");
MB_Initialize();
LogFileOutput("WM_CREATE: MB_Initialize()\n");
@ -1130,8 +1130,9 @@ LRESULT CALLBACK FrameWndProc (
break;
case WM_MOUSEMOVE: {
int x = LOWORD(lparam);
int y = HIWORD(lparam);
// MSDN: "WM_MOUSEMOVE message" : Do not use the LOWORD or HIWORD macros to extract the x- and y- coordinates...
int x = GET_X_LPARAM(lparam);
int y = GET_Y_LPARAM(lparam);
int newover = (((x >= buttonx) &&
(x <= buttonx+BUTTONCX) &&
(y >= buttony) &&