Skip to content

Commit

Permalink
Renamed SDL_iPhoneGetViewFramebuffer/Renderbuffer to SDL_iOSGetViewFr…
Browse files Browse the repository at this point in the history
…amebuffer/Renderbuffer. Added #defines for SDL_iOSSetAnimationCallback and SDL_iOSSetEventPump, which point to SDL_iPhoneSetAnimationCallback and SDL_iPhoneSetEventPump.
  • Loading branch information
slime73 committed Apr 8, 2015
1 parent 1152a75 commit fcd0f06
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 8 deletions.
7 changes: 5 additions & 2 deletions include/SDL_system.h
Expand Up @@ -73,22 +73,25 @@ extern DECLSPEC SDL_bool SDLCALL SDL_DXGIGetOutputInfo( int displayIndex, int *a
/* Platform specific functions for iOS */ /* Platform specific functions for iOS */
#if defined(__IPHONEOS__) && __IPHONEOS__ #if defined(__IPHONEOS__) && __IPHONEOS__


#define SDL_iOSSetAnimationCallback(window, interval, callback, callbackParam) SDL_iPhoneSetAnimationCallback(window, interval, callback, callbackParam)
extern DECLSPEC int SDLCALL SDL_iPhoneSetAnimationCallback(SDL_Window * window, int interval, void (*callback)(void*), void *callbackParam); extern DECLSPEC int SDLCALL SDL_iPhoneSetAnimationCallback(SDL_Window * window, int interval, void (*callback)(void*), void *callbackParam);

#define SDL_iOSSetEventPump(enabled) SDL_iPhoneSetEventPump(enabled)
extern DECLSPEC void SDLCALL SDL_iPhoneSetEventPump(SDL_bool enabled); extern DECLSPEC void SDLCALL SDL_iPhoneSetEventPump(SDL_bool enabled);


/** /**
\brief Returns the OpenGL Renderbuffer Object associated with the window's main view. \brief Returns the OpenGL Renderbuffer Object associated with the window's main view.
The Renderbuffer must be bound when calling SDL_GL_SwapWindow. The Renderbuffer must be bound when calling SDL_GL_SwapWindow.
*/ */
extern DECLSPEC Uint32 SDLCALL SDL_iPhoneGetViewRenderbuffer(SDL_Window * window); extern DECLSPEC Uint32 SDLCALL SDL_iOSGetViewRenderbuffer(SDL_Window * window);


/** /**
\brief Returns the OpenGL Framebuffer Object associated with the window's main view. \brief Returns the OpenGL Framebuffer Object associated with the window's main view.
The Framebuffer must be bound when rendering to the screen. The Framebuffer must be bound when rendering to the screen.
*/ */
extern DECLSPEC Uint32 SDLCALL SDL_iPhoneGetViewFramebuffer(SDL_Window * window); extern DECLSPEC Uint32 SDLCALL SDL_iOSGetViewFramebuffer(SDL_Window * window);


#endif /* __IPHONEOS__ */ #endif /* __IPHONEOS__ */


Expand Down
4 changes: 2 additions & 2 deletions src/dynapi/SDL_dynapi_overrides.h
Expand Up @@ -592,5 +592,5 @@
#define SDL_GetQueuedAudioSize SDL_GetQueuedAudioSize_REAL #define SDL_GetQueuedAudioSize SDL_GetQueuedAudioSize_REAL
#define SDL_ClearQueuedAudio SDL_ClearQueuedAudio_REAL #define SDL_ClearQueuedAudio SDL_ClearQueuedAudio_REAL
#define SDL_GetGrabbedWindow SDL_GetGrabbedWindow_REAL #define SDL_GetGrabbedWindow SDL_GetGrabbedWindow_REAL
#define SDL_iPhoneGetViewRenderbuffer SDL_iPhoneGetViewRenderbuffer_REAL #define SDL_iOSGetViewRenderbuffer SDL_iOSGetViewRenderbuffer_REAL
#define SDL_iPhoneGetViewFramebuffer SDL_iPhoneGetViewFramebuffer_REAL #define SDL_iOSGetViewFramebuffer SDL_iOSGetViewFramebuffer_REAL
6 changes: 4 additions & 2 deletions src/dynapi/SDL_dynapi_procs.h
Expand Up @@ -624,5 +624,7 @@ SDL_DYNAPI_PROC(int,SDL_QueueAudio,(SDL_AudioDeviceID a, const void *b, Uint32 c
SDL_DYNAPI_PROC(Uint32,SDL_GetQueuedAudioSize,(SDL_AudioDeviceID a),(a),return) SDL_DYNAPI_PROC(Uint32,SDL_GetQueuedAudioSize,(SDL_AudioDeviceID a),(a),return)
SDL_DYNAPI_PROC(void,SDL_ClearQueuedAudio,(SDL_AudioDeviceID a),(a),) SDL_DYNAPI_PROC(void,SDL_ClearQueuedAudio,(SDL_AudioDeviceID a),(a),)
SDL_DYNAPI_PROC(SDL_Window*,SDL_GetGrabbedWindow,(void),(),return) SDL_DYNAPI_PROC(SDL_Window*,SDL_GetGrabbedWindow,(void),(),return)
SDL_DYNAPI_PROC(Uint32,SDL_iPhoneGetViewRenderbuffer,(SDL_Window *a),(a),return) #if defined(__IPHONEOS__) && __IPHONEOS__
SDL_DYNAPI_PROC(Uint32,SDL_iPhoneGetViewFramebuffer,(SDL_Window *a),(a),return) SDL_DYNAPI_PROC(Uint32,SDL_iOSGetViewRenderbuffer,(SDL_Window *a),(a),return)
SDL_DYNAPI_PROC(Uint32,SDL_iOSGetViewFramebuffer,(SDL_Window *a),(a),return)
#endif
4 changes: 2 additions & 2 deletions src/video/uikit/SDL_uikitopengles.m
Expand Up @@ -184,7 +184,7 @@ void UIKit_GL_SwapWindow(_THIS, SDL_Window * window)
} }


Uint32 Uint32
SDL_iPhoneGetViewRenderbuffer(SDL_Window * window) SDL_iOSGetViewRenderbuffer(SDL_Window * window)
{ {
if (!window) { if (!window) {
SDL_SetError("Invalid window"); SDL_SetError("Invalid window");
Expand All @@ -205,7 +205,7 @@ void UIKit_GL_SwapWindow(_THIS, SDL_Window * window)
} }


Uint32 Uint32
SDL_iPhoneGetViewFramebuffer(SDL_Window * window) SDL_iOSGetViewFramebuffer(SDL_Window * window)
{ {
if (!window) { if (!window) {
SDL_SetError("Invalid window"); SDL_SetError("Invalid window");
Expand Down

0 comments on commit fcd0f06

Please sign in to comment.