Moved iOS-specific code into uikit target. Fixes crashes in X11 target.
This commit is contained in:
parent
48e3952607
commit
63b91d2986
4 changed files with 12 additions and 7 deletions
|
@ -1890,13 +1890,6 @@ SDL_OnWindowRestored(SDL_Window * window)
|
|||
if (FULLSCREEN_VISIBLE(window)) {
|
||||
SDL_UpdateFullscreenMode(window, SDL_TRUE);
|
||||
}
|
||||
|
||||
/* This needs to be done on iOS to rebind the nscontext to the view,
|
||||
and (hopefully) doesn't hurt on other systems.
|
||||
*/
|
||||
if (window == _this->current_glwin) {
|
||||
_this->GL_MakeCurrent(_this, _this->current_glwin, _this->current_glctx);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -85,6 +85,7 @@ UIKit_CreateDevice(int devindex)
|
|||
device->CreateWindow = UIKit_CreateWindow;
|
||||
device->ShowWindow = UIKit_ShowWindow;
|
||||
device->HideWindow = UIKit_HideWindow;
|
||||
device->RaiseWindow = UIKit_RaiseWindow;
|
||||
device->SetWindowFullscreen = UIKit_SetWindowFullscreen;
|
||||
device->DestroyWindow = UIKit_DestroyWindow;
|
||||
device->GetWindowWMInfo = UIKit_GetWindowWMInfo;
|
||||
|
|
|
@ -31,6 +31,7 @@ typedef struct SDL_WindowData SDL_WindowData;
|
|||
extern int UIKit_CreateWindow(_THIS, SDL_Window * window);
|
||||
extern void UIKit_ShowWindow(_THIS, SDL_Window * window);
|
||||
extern void UIKit_HideWindow(_THIS, SDL_Window * window);
|
||||
extern void UIKit_RaiseWindow(_THIS, SDL_Window * window);
|
||||
extern void UIKit_SetWindowFullscreen(_THIS, SDL_Window * window, SDL_VideoDisplay * display, SDL_bool fullscreen);
|
||||
extern void UIKit_DestroyWindow(_THIS, SDL_Window * window);
|
||||
extern SDL_bool UIKit_GetWindowWMInfo(_THIS, SDL_Window * window,
|
||||
|
|
|
@ -225,6 +225,16 @@ UIKit_HideWindow(_THIS, SDL_Window * window)
|
|||
uiwindow.hidden = YES;
|
||||
}
|
||||
|
||||
void
|
||||
UIKit_RaiseWindow(_THIS, SDL_Window * window)
|
||||
{
|
||||
// We don't currently offer a concept of "raising" the SDL window, since
|
||||
// we only allow one per display, in the iOS fashion.
|
||||
// However, we use this entry point to rebind the context to the view
|
||||
// during OnWindowRestored processing.
|
||||
_this->GL_MakeCurrent(_this, _this->current_glwin, _this->current_glctx);
|
||||
}
|
||||
|
||||
void
|
||||
UIKit_SetWindowFullscreen(_THIS, SDL_Window * window, SDL_VideoDisplay * display, SDL_bool fullscreen)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue