misc native build fixups
[org.ibex.core.git] / src / org / ibex / plat / Win32.cc
index fda911b..4c0369f 100644 (file)
@@ -147,7 +147,8 @@ static unsigned char hand_cursor_and[32 * 4] = {
 };
 
 void org::ibex::plat::Win32::natPreInit() {
-    if (org::ibex::util::Log::verbose) {
+  // Win32 throws stderr in the trash unless you designate your binary as a "console binary"
+  if (org::ibex::util::Log::logstream == java::lang::System::err) {
         AllocConsole();
         freopen("CONOUT$", "w+t", stderr);
     }
@@ -637,7 +638,9 @@ jint org::ibex::plat::Win32$Win32Surface::WndProc(jint _hwnd, jint _iMsg, jint _
     switch(iMsg) {
     case WM_DEVMODECHANGE: break;    // FEATURE: color depth changed
     case WM_DISPLAYCHANGE: break;    // FEATURE: screen size changed
-    case WM_MOUSEWHEEL: break;       // FEATURE: Mouse Wheel
+    case WM_MOUSEWHEEL:
+      VScroll(((jfloat)((wParam & 0xffff0000) >> 16)) / (jfloat)120);
+      break;
 
     case WM_SYSKEYDOWN: if (GetKeyState(VK_MENU) >> (sizeof(SHORT) * 8 - 1) == 0) return 0;
     case WM_KEYDOWN: