diff -Naur libsdl-1.2-hg/src/events/SDL_quit.c libsdl-1.2-hg-haiku/src/events/SDL_quit.c
|
old
|
new
|
|
| 45 | 45 | /* Public functions */ |
| 46 | 46 | int SDL_QuitInit(void) |
| 47 | 47 | { |
| 48 | | #ifdef HAVE_SIGACTION |
| | 48 | #if defined(HAVE_SIGACTION) && !defined(__HAIKU__) |
| 49 | 49 | struct sigaction action; |
| 50 | 50 | sigaction(SIGINT, NULL, &action); |
| 51 | 51 | if ( action.sa_handler == SIG_DFL && action.sa_sigaction == (void*)SIG_DFL ) { |
diff -Naur libsdl-1.2-hg/src/video/SDL_cursor.c libsdl-1.2-hg-haiku/src/video/SDL_cursor.c
|
old
|
new
|
|
| 729 | 729 | if ( SDL_MUSTLOCK(screen) ) { |
| 730 | 730 | SDL_UnlockSurface(screen); |
| 731 | 731 | } |
| | 732 | |
| 732 | 733 | if ( (screen == SDL_VideoSurface) && |
| 733 | 734 | ((screen->flags & SDL_HWSURFACE) != SDL_HWSURFACE) ) { |
| 734 | 735 | SDL_VideoDevice *video = current_video; |
diff -Naur libsdl-1.2-hg/src/video/bwindow/SDL_BWin.h libsdl-1.2-hg-haiku/src/video/bwindow/SDL_BWin.h
|
old
|
new
|
|
| 112 | 112 | if ( SDL_GLView == NULL ) { |
| 113 | 113 | SDL_GLView = new BGLView(Bounds(), "SDL GLView", |
| 114 | 114 | B_FOLLOW_ALL_SIDES, (B_WILL_DRAW|B_FRAME_EVENTS), |
| 115 | | gl_flags); |
| | 115 | gl_flags|BGL_DOUBLE); |
| 116 | 116 | SDL_GLView->EnableDirectMode(true); |
| 117 | 117 | } |
| 118 | 118 | if ( the_view != SDL_GLView ) { |
| … |
… |
|
| 133 | 133 | } |
| 134 | 134 | if ( the_view != SDL_View ) { |
| 135 | 135 | if ( the_view ) { |
| 136 | | #if SDL_VIDEO_OPENGL |
| 137 | | if ( the_view == SDL_GLView ) { |
| 138 | | SDL_GLView->UnlockGL(); |
| 139 | | } |
| 140 | | #endif |
| 141 | 136 | RemoveChild(the_view); |
| 142 | 137 | } |
| 143 | 138 | AddChild(SDL_View); |
| 144 | 139 | the_view = SDL_View; |
| 145 | 140 | } |
| 146 | 141 | } |
| | 142 | #if SDL_VIDEO_OPENGL |
| | 143 | if ( the_view == SDL_GLView ) { |
| | 144 | SDL_GLView->UnlockGL(); |
| | 145 | } |
| | 146 | #endif |
| 147 | 147 | Unlock(); |
| 148 | 148 | return(retval); |
| 149 | 149 | } |
| … |
… |
|
| 191 | 191 | #if SDL_VIDEO_OPENGL |
| 192 | 192 | virtual void SwapBuffers(void) { |
| 193 | 193 | SDL_GLView->UnlockGL(); |
| 194 | | SDL_GLView->LockGL(); |
| 195 | 194 | SDL_GLView->SwapBuffers(); |
| | 195 | SDL_GLView->LockGL(); |
| 196 | 196 | } |
| 197 | 197 | #endif |
| 198 | 198 | virtual BView *View(void) { |
| … |
… |
|
| 215 | 215 | the application should respond to the quit request, |
| 216 | 216 | or ignore it as desired. |
| 217 | 217 | */ |
| | 218 | #if SDL_VIDEO_OPENGL |
| | 219 | if ( SDL_GLView != NULL ) { |
| | 220 | SDL_GLView->EnableDirectMode(false); |
| | 221 | } |
| | 222 | #endif |
| 218 | 223 | return(false); |
| 219 | 224 | } |
| 220 | 225 | return(true); /* Close the app window */ |
diff -Naur libsdl-1.2-hg/src/video/bwindow/SDL_sysevents.cc libsdl-1.2-hg-haiku/src/video/bwindow/SDL_sysevents.cc
|
old
|
new
|
|
| 36 | 36 | #include "../../events/SDL_sysevents.h" |
| 37 | 37 | #include "../../events/SDL_events_c.h" |
| 38 | 38 | #include "SDL_sysevents_c.h" |
| | 39 | #include "../SDL_cursor_c.h" |
| 39 | 40 | |
| 40 | 41 | void BE_PumpEvents(_THIS) |
| 41 | 42 | { |
| … |
… |
|
| 203 | 204 | if (transit == B_EXITED_VIEW) { |
| 204 | 205 | if ( SDL_GetAppState() & SDL_APPMOUSEFOCUS ) { |
| 205 | 206 | SDL_PrivateAppActive(0, SDL_APPMOUSEFOCUS); |
| | 207 | #if SDL_VIDEO_OPENGL |
| | 208 | // for some reason, SDL_EraseCursor fails for OpenGL |
| | 209 | if (this->the_view != this->SDL_GLView) |
| | 210 | #endif |
| | 211 | SDL_EraseCursor(SDL_VideoSurface); |
| 206 | 212 | be_app->SetCursor(B_HAND_CURSOR); |
| 207 | 213 | } |
| 208 | 214 | } else { |
| 209 | 215 | if ( !(SDL_GetAppState() & SDL_APPMOUSEFOCUS) ) { |
| 210 | 216 | SDL_PrivateAppActive(1, SDL_APPMOUSEFOCUS); |
| | 217 | #if SDL_VIDEO_OPENGL |
| | 218 | // for some reason, SDL_EraseCursor fails for OpenGL |
| | 219 | if (this->the_view != this->SDL_GLView) |
| | 220 | #endif |
| | 221 | SDL_EraseCursor(SDL_VideoSurface); |
| 211 | 222 | SDL_SetCursor(NULL); |
| 212 | 223 | } |
| 213 | 224 | |
| … |
… |
|
| 395 | 406 | default: |
| 396 | 407 | break; |
| 397 | 408 | } |
| | 409 | #if SDL_VIDEO_OPENGL |
| | 410 | // If it is a BGLView, it is apparently required to |
| | 411 | // call DirectConnected() on it as well |
| | 412 | if (this->the_view == this->SDL_GLView) |
| | 413 | this->SDL_GLView->DirectConnected(info); |
| | 414 | #endif |
| 398 | 415 | } |