Fix a small misspell in OGL config, Fix the toggle fullscreen button when rendering to separate window + a weird issue related to rendering to main.

Code cleanup in nJoy i had around for a while, it also adds code to support SDL 1.3's force feedback API and is more stable (will not crash anymore on stop when rumble is enabled)

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4459 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
sl1nk3.s
2009-10-24 00:18:21 +00:00
parent bf4ae6aaa0
commit 9154424841
21 changed files with 229 additions and 663 deletions

View File

@ -275,7 +275,7 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT iMsg, WPARAM wParam, LPARAM lParam)
switch (iMsg)
{
case WM_CREATE:
PostMessage(m_hParent, WM_USER, OPENGL_WM_USER_CREATE, (int)m_hParent);
PostMessage((HWND)g_VideoInitialize.pWindowHandle, WM_USER, OPENGL_WM_USER_CREATE, (int)m_hParent);
break;
case WM_PAINT:
@ -345,6 +345,8 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT iMsg, WPARAM wParam, LPARAM lParam)
}
if (wParam == OPENGL_WM_USER_KEYDOWN)
OnKeyDown(lParam);
if (wParam == TOGGLE_FULLSCREEN)
ToggleFullscreen(m_hWnd);
break;
// This is called when we close the window when we render to a separate window
@ -418,6 +420,11 @@ HWND OpenWindow(HWND parent, HINSTANCE hInstance, int width, int height, const T
// Create new separate window
else
{
// Don't forget to make it NULL, or a broken window will be created in case we
// render to main, stop, then render to separate window, as the GUI will still
// think we're rendering to main because m_hParent will still contain the old HWND...
m_hParent = NULL;
DWORD style = g_Config.bFullscreen ? WS_POPUP : WS_OVERLAPPEDWINDOW;
RECT rc = {0, 0, width, height};