Skip to content

Commit

Permalink
*** empty log message ***
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Nov 15, 2004
1 parent c4cfe27 commit 58af579
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
1 change: 0 additions & 1 deletion src/video/windib/SDL_dibevents.c
Expand Up @@ -368,7 +368,6 @@ int DIB_CreateWindow(_THIS)
SDL_RegisterApp("SDL_app", CS_BYTEALIGNCLIENT, 0);
if ( SDL_windowid ) {
SDL_Window = (HWND)strtol(SDL_windowid, NULL, 0);

if ( SDL_Window == NULL ) {
SDL_SetError("Couldn't get user specified window");
return(-1);
Expand Down
18 changes: 12 additions & 6 deletions src/video/windx5/SDL_dx5events.c
Expand Up @@ -849,14 +849,16 @@ int DX5_CreateWindow(_THIS)
SDL_RegisterApp("SDL_app", CS_BYTEALIGNCLIENT, 0);
if ( SDL_windowid ) {
SDL_Window = (HWND)strtol(SDL_windowid, NULL, 0);
if ( SDL_Window == NULL ) {
SDL_SetError("Couldn't get user specified window");
return(-1);
}

/* DJM: we want all event's for the user specified
window to be handled by SDL.
window to be handled by SDL.
*/
if (SDL_Window) {
userWindowProc = (WNDPROC)GetWindowLong(SDL_Window, GWL_WNDPROC);
SetWindowLong(SDL_Window, GWL_WNDPROC, (LONG)WinMessage);
}
userWindowProc = (WNDPROC)GetWindowLong(SDL_Window, GWL_WNDPROC);
SetWindowLong(SDL_Window, GWL_WNDPROC, (LONG)WinMessage);
} else {
SDL_Window = CreateWindow(SDL_Appname, SDL_Appname,
(WS_OVERLAPPED|WS_CAPTION|WS_SYSMENU|WS_MINIMIZEBOX),
Expand All @@ -883,5 +885,9 @@ void DX5_DestroyWindow(_THIS)
DX5_DInputQuit(this);

/* Destroy our window */
DestroyWindow(SDL_Window);
if ( SDL_windowid ) {
SetWindowLong(SDL_Window, GWL_WNDPROC, (LONG)userWindowProc);
} else {
DestroyWindow(SDL_Window);
}
}

0 comments on commit 58af579

Please sign in to comment.