Changeset 325


Ignore:
Timestamp:
08/26/14 15:44:32 (11 years ago)
Author:
epyon
Message:
  • removed legacy SDL 1.2 support - no reason to support it anymore
Location:
trunk/nv/lib
Files:
4 deleted
4 edited
2 moved

Legend:

Unmodified
Added
Removed
  • trunk/nv/lib/detail/sdl_functions.inc

    r171 r325  
    103103NV_SDL_FUN( int, SDL_GL_GetAttribute, (SDL_GLattr attr, int* value) );
    104104
     105/* SDL_video.h defines */
     106NV_SDL_FUN( int , SDL_GetNumVideoDrivers, (void) );
     107NV_SDL_FUN( const char *, SDL_GetVideoDriver, (int index) );
     108NV_SDL_FUN( int , SDL_VideoInit, (const char *driver_name) );
     109NV_SDL_FUN( void , SDL_VideoQuit, (void) );
     110NV_SDL_FUN( const char *, SDL_GetCurrentVideoDriver, (void) );
     111NV_SDL_FUN( int , SDL_GetNumVideoDisplays, (void) );
     112NV_SDL_FUN( const char * , SDL_GetDisplayName, (int displayIndex) );
     113NV_SDL_FUN( int , SDL_GetDisplayBounds, (int displayIndex, SDL_Rect * rect) );
     114NV_SDL_FUN( int , SDL_GetNumDisplayModes, (int displayIndex) );
     115NV_SDL_FUN( int , SDL_GetDisplayMode, (int displayIndex, int modeIndex,SDL_DisplayMode * mode) );
     116NV_SDL_FUN( int , SDL_GetDesktopDisplayMode, (int displayIndex, SDL_DisplayMode * mode) );
     117NV_SDL_FUN( int , SDL_GetCurrentDisplayMode, (int displayIndex, SDL_DisplayMode * mode) );
     118NV_SDL_FUN( SDL_DisplayMode * , SDL_GetClosestDisplayMode, (int displayIndex, const SDL_DisplayMode * mode, SDL_DisplayMode * closest) );
     119NV_SDL_FUN( int , SDL_GetWindowDisplayIndex, (SDL_Window * window) );
     120NV_SDL_FUN( int , SDL_SetWindowDisplayMode, (SDL_Window * window,const SDL_DisplayMode* mode) );
     121NV_SDL_FUN( int , SDL_GetWindowDisplayMode, (SDL_Window * window,SDL_DisplayMode * mode) );
     122NV_SDL_FUN( Uint32 , SDL_GetWindowPixelFormat, (SDL_Window * window) );
     123NV_SDL_FUN( SDL_Window * , SDL_CreateWindow, (const char *title,int x, int y, int w,int h, Uint32 flags) );
     124NV_SDL_FUN( SDL_Window * , SDL_CreateWindowFrom, (const void *data) );
     125NV_SDL_FUN( Uint32 , SDL_GetWindowID, (SDL_Window * window) );
     126NV_SDL_FUN( SDL_Window * , SDL_GetWindowFromID, (Uint32 id) );
     127NV_SDL_FUN( Uint32 , SDL_GetWindowFlags, (SDL_Window * window) );
     128NV_SDL_FUN( void , SDL_SetWindowTitle, (SDL_Window * window,const char *title) );
     129NV_SDL_FUN( const char *, SDL_GetWindowTitle, (SDL_Window * window) );
     130NV_SDL_FUN( void , SDL_SetWindowIcon, (SDL_Window * window,SDL_Surface * icon) );
     131NV_SDL_FUN( void* , SDL_SetWindowData, (SDL_Window * window,const char *name,void *userdata) );
     132NV_SDL_FUN( void *, SDL_GetWindowData, (SDL_Window * window,const char *name) );
     133NV_SDL_FUN( void , SDL_SetWindowPosition, (SDL_Window * window,int x, int y) );
     134NV_SDL_FUN( void , SDL_GetWindowPosition, (SDL_Window * window,int *x, int *y) );
     135NV_SDL_FUN( void , SDL_SetWindowSize, (SDL_Window * window, int w,int h) );
     136NV_SDL_FUN( void , SDL_GetWindowSize, (SDL_Window * window, int *w,int *h) );
     137NV_SDL_FUN( void , SDL_SetWindowMinimumSize, (SDL_Window * window,int min_w, int min_h) );
     138NV_SDL_FUN( void , SDL_GetWindowMinimumSize, (SDL_Window * window,int *w, int *h) );
     139NV_SDL_FUN( void , SDL_SetWindowMaximumSize, (SDL_Window * window,int max_w, int max_h) );
     140NV_SDL_FUN( void , SDL_GetWindowMaximumSize, (SDL_Window * window,int *w, int *h) );
     141NV_SDL_FUN( void , SDL_SetWindowBordered, (SDL_Window * window,SDL_bool bordered) );
     142NV_SDL_FUN( void , SDL_ShowWindow, (SDL_Window * window) );
     143NV_SDL_FUN( void , SDL_HideWindow, (SDL_Window * window) );
     144NV_SDL_FUN( void , SDL_RaiseWindow, (SDL_Window * window) );
     145NV_SDL_FUN( void , SDL_MaximizeWindow, (SDL_Window * window) );
     146NV_SDL_FUN( void , SDL_MinimizeWindow, (SDL_Window * window) );
     147NV_SDL_FUN( void , SDL_RestoreWindow, (SDL_Window * window) );
     148NV_SDL_FUN( int , SDL_SetWindowFullscreen, (SDL_Window * window,Uint32 flags) );
     149NV_SDL_FUN( SDL_Surface * , SDL_GetWindowSurface, (SDL_Window * window) );
     150NV_SDL_FUN( int , SDL_UpdateWindowSurface, (SDL_Window * window) );
     151NV_SDL_FUN( int , SDL_UpdateWindowSurfaceRects, (SDL_Window * window,const SDL_Rect * rects,int numrects) );
     152NV_SDL_FUN( void , SDL_SetWindowGrab, (SDL_Window * window,SDL_bool grabbed) );
     153NV_SDL_FUN( SDL_bool , SDL_GetWindowGrab, (SDL_Window * window) );
     154NV_SDL_FUN( int , SDL_SetWindowBrightness, (SDL_Window * window, float brightness) );
     155NV_SDL_FUN( float , SDL_GetWindowBrightness, (SDL_Window * window) );
     156NV_SDL_FUN( int , SDL_SetWindowGammaRamp, (SDL_Window * window,const Uint16 * red,const Uint16 * green,const Uint16 * blue) );
     157NV_SDL_FUN( int , SDL_GetWindowGammaRamp, (SDL_Window * window,Uint16 * red,Uint16 * green,Uint16 * blue) );
     158NV_SDL_FUN( void , SDL_DestroyWindow, (SDL_Window * window) );
     159NV_SDL_FUN( SDL_bool , SDL_IsScreenSaverEnabled, (void) );
     160NV_SDL_FUN( void , SDL_EnableScreenSaver, (void) );
     161NV_SDL_FUN( void , SDL_DisableScreenSaver, (void) );
     162NV_SDL_FUN( void , SDL_GL_UnloadLibrary, (void) );
     163NV_SDL_FUN( SDL_bool , SDL_GL_ExtensionSupported, (const char*extension) );
     164NV_SDL_FUN( SDL_GLContext , SDL_GL_CreateContext, (SDL_Window *window) );
     165NV_SDL_FUN( int , SDL_GL_MakeCurrent, (SDL_Window * window,SDL_GLContext context) );
     166NV_SDL_FUN( SDL_Window* , SDL_GL_GetCurrentWindow, (void) );
     167NV_SDL_FUN( SDL_GLContext , SDL_GL_GetCurrentContext, (void) );
     168NV_SDL_FUN( int , SDL_GL_SetSwapInterval, (int interval) );
     169NV_SDL_FUN( int , SDL_GL_GetSwapInterval, (void) );
     170NV_SDL_FUN( void , SDL_GL_SwapWindow, (SDL_Window * window) );
     171NV_SDL_FUN( void , SDL_GL_DeleteContext, (SDL_GLContext context) );
     172
     173/* SDL_audio.h functions */
     174NV_SDL_FUN( int , SDL_GetNumAudioDrivers, (void) );
     175NV_SDL_FUN( const char *, SDL_GetAudioDriver, (int index) );
     176NV_SDL_FUN( const char *, SDL_GetCurrentAudioDriver, (void) );
     177NV_SDL_FUN( int , SDL_GetNumAudioDevices, (int iscapture) );
     178NV_SDL_FUN( const char *, SDL_GetAudioDeviceName, (int index, int iscapture) );
     179NV_SDL_FUN( SDL_AudioDeviceID , SDL_OpenAudioDevice, (const char *device, int iscapture, const SDL_AudioSpec * desired, SDL_AudioSpec * obtained, int allowed_changes) );
     180NV_SDL_FUN( SDL_AudioStatus , SDL_GetAudioDeviceStatus, (SDL_AudioDeviceID dev) );
     181NV_SDL_FUN( void , SDL_PauseAudioDevice, (SDL_AudioDeviceID dev, int pause_on) );
     182NV_SDL_FUN( void , SDL_MixAudioFormat, (Uint8 * dst, const Uint8 * src, SDL_AudioFormat format, Uint32 len, int volume) );
     183NV_SDL_FUN( void , SDL_LockAudioDevice, (SDL_AudioDeviceID dev) );
     184NV_SDL_FUN( void , SDL_UnlockAudioDevice, (SDL_AudioDeviceID dev) );
     185NV_SDL_FUN( void , SDL_CloseAudioDevice, (SDL_AudioDeviceID dev) );
     186// NV_SDL_FUN( int , SDL_AudioDeviceConnected, (SDL_AudioDeviceID dev) );
     187
     188/* SDL_cpuinfo.h functions */
     189NV_SDL_FUN( int , SDL_GetCPUCount, (void) );
     190NV_SDL_FUN( int , SDL_GetCPUCacheLineSize, (void) );
     191NV_SDL_FUN( SDL_bool, SDL_HasSSE3, (void) );
     192NV_SDL_FUN( SDL_bool, SDL_HasSSE41, (void) );
     193NV_SDL_FUN( SDL_bool, SDL_HasSSE42, (void) );
     194
     195/* SDL_error.h functions */
     196NV_SDL_FUN( int, SDL_SetError, (const char *fmt, ...) );
     197NV_SDL_FUN( int, SDL_Error, (SDL_errorcode code) );
     198
     199/* SDL_keyboard.h functions */
     200NV_SDL_FUN( SDL_Window * , SDL_GetKeyboardFocus, (void) );
     201NV_SDL_FUN( const Uint8 *, SDL_GetKeyboardState, (int *numkeys) );
     202NV_SDL_FUN( SDL_Keymod , SDL_GetModState, (void) );
     203NV_SDL_FUN( void , SDL_SetModState, (SDL_Keymod modstate) );
     204NV_SDL_FUN( SDL_Keycode , SDL_GetKeyFromScancode, (SDL_Scancode scancode) );
     205NV_SDL_FUN( SDL_Scancode , SDL_GetScancodeFromKey, (SDL_Keycode key) );
     206NV_SDL_FUN( const char *, SDL_GetScancodeName, (SDL_Scancode scancode) );
     207NV_SDL_FUN( SDL_Scancode , SDL_GetScancodeFromName, (const char *name) );
     208NV_SDL_FUN( const char *, SDL_GetKeyName, (SDL_Keycode key) );
     209NV_SDL_FUN( SDL_Keycode , SDL_GetKeyFromName, (const char *name) );
     210NV_SDL_FUN( void , SDL_StartTextInput, (void) );
     211NV_SDL_FUN( SDL_bool , SDL_IsTextInputActive, (void) );
     212NV_SDL_FUN( void , SDL_StopTextInput, (void) );
     213NV_SDL_FUN( void , SDL_SetTextInputRect, (SDL_Rect *rect) );
     214NV_SDL_FUN( SDL_bool , SDL_HasScreenKeyboardSupport, (void) );
     215NV_SDL_FUN( SDL_bool , SDL_IsScreenKeyboardShown, (SDL_Window *window) );
     216
     217/* SDL_mouse.h functions */
     218NV_SDL_FUN( SDL_Window * , SDL_GetMouseFocus, (void) );
     219NV_SDL_FUN( Uint32 , SDL_GetMouseState, (int *x, int *y) );
     220NV_SDL_FUN( Uint32 , SDL_GetRelativeMouseState, (int *x, int *y) );
     221NV_SDL_FUN( void , SDL_WarpMouseInWindow, (SDL_Window * window,int x, int y) );
     222NV_SDL_FUN( int , SDL_SetRelativeMouseMode, (SDL_bool enabled) );
     223NV_SDL_FUN( SDL_bool , SDL_GetRelativeMouseMode, (void) );
     224NV_SDL_FUN( SDL_Cursor *, SDL_CreateCursor, (const Uint8 * data,const Uint8 * mask,int w, int h, int hot_x,int hot_y) );
     225NV_SDL_FUN( SDL_Cursor *, SDL_CreateColorCursor, (SDL_Surface *surface,int hot_x,int hot_y) );
     226NV_SDL_FUN( SDL_Cursor *, SDL_CreateSystemCursor, (SDL_SystemCursor id) );
     227NV_SDL_FUN( SDL_Cursor *, SDL_GetDefaultCursor, (void) );
     228
     229NV_SDL_FUN( const char *, SDL_JoystickName, (SDL_Joystick * joystick) );
     230NV_SDL_FUN( const char *, SDL_JoystickNameForIndex, (int device_index) );
     231NV_SDL_FUN( SDL_JoystickGUID , SDL_JoystickGetDeviceGUID, (int device_index) );
     232NV_SDL_FUN( SDL_JoystickGUID , SDL_JoystickGetGUID, (SDL_Joystick * joystick) );
     233NV_SDL_FUN( void, SDL_JoystickGetGUIDString, (SDL_JoystickGUID guid, char *pszGUID, int cbGUID) );
     234NV_SDL_FUN( SDL_JoystickGUID , SDL_JoystickGetGUIDFromString, (const char *pchGUID) );
     235NV_SDL_FUN( SDL_bool , SDL_JoystickGetAttached, (SDL_Joystick * joystick) );
     236NV_SDL_FUN( SDL_JoystickID , SDL_JoystickInstanceID, (SDL_Joystick * joystick) );
     237
     238NV_SDL_FUN( Uint64 , SDL_GetPerformanceCounter, (void) );
     239NV_SDL_FUN( Uint64 , SDL_GetPerformanceFrequency, (void) );
     240
     241/* SDL_version.h functions */
     242NV_SDL_FUN( void , SDL_GetVersion, (SDL_version * ver) );
     243NV_SDL_FUN( const char *, SDL_GetRevision, (void) );
     244NV_SDL_FUN( int , SDL_GetRevisionNumber, (void) );
     245
     246/* SDL_event.h functions */
     247NV_SDL_FUN( int , SDL_PeepEvents, (SDL_Event * events, int numevents,SDL_eventaction action,Uint32 minType, Uint32 maxType) );
     248NV_SDL_FUN( SDL_bool , SDL_HasEvent, (Uint32 type) );
     249NV_SDL_FUN( SDL_bool , SDL_HasEvents, (Uint32 minType, Uint32 maxType) );
     250NV_SDL_FUN( void , SDL_FlushEvent, (Uint32 type) );
     251NV_SDL_FUN( void , SDL_FlushEvents, (Uint32 minType, Uint32 maxType) );
     252NV_SDL_FUN( int , SDL_WaitEventTimeout, (SDL_Event * event,int timeout) );
     253NV_SDL_FUN( void , SDL_SetEventFilter, (SDL_EventFilter filter,void *userdata) );
     254NV_SDL_FUN( SDL_bool , SDL_GetEventFilter, (SDL_EventFilter * filter,void **userdata) );
     255NV_SDL_FUN( void , SDL_AddEventWatch, (SDL_EventFilter filter,void *userdata) );
     256NV_SDL_FUN( void , SDL_DelEventWatch, (SDL_EventFilter filter,void *userdata) );
     257NV_SDL_FUN( void , SDL_FilterEvents, (SDL_EventFilter filter,void *userdata) );
     258NV_SDL_FUN( Uint8 , SDL_EventState, (Uint32 type, int state) );
     259NV_SDL_FUN( Uint32 , SDL_RegisterEvents, (int numevents) );
     260
     261/* SDL_clipboard.h functions */
     262NV_SDL_FUN( int, SDL_SetClipboardText, (const char *text) );
     263NV_SDL_FUN( char *, SDL_GetClipboardText, (void) );
     264NV_SDL_FUN( SDL_bool, SDL_HasClipboardText, (void) );
     265
     266/* SDL_gamecontroller.h functions */
     267NV_SDL_FUN( int , SDL_GameControllerAddMapping, ( const char* mappingString ) );
     268NV_SDL_FUN( char * , SDL_GameControllerMappingForGUID, ( SDL_JoystickGUID guid ) );
     269NV_SDL_FUN( char * , SDL_GameControllerMapping, ( SDL_GameController * gamecontroller ) );
     270NV_SDL_FUN( SDL_bool , SDL_IsGameController, (int joystick_index) );
     271NV_SDL_FUN( const char *, SDL_GameControllerNameForIndex, (int joystick_index) );
     272NV_SDL_FUN( SDL_GameController *, SDL_GameControllerOpen, (int joystick_index) );
     273NV_SDL_FUN( const char *, SDL_GameControllerName, (SDL_GameController *gamecontroller) );
     274NV_SDL_FUN( SDL_bool , SDL_GameControllerGetAttached, (SDL_GameController *gamecontroller) );
     275NV_SDL_FUN( SDL_Joystick *, SDL_GameControllerGetJoystick, (SDL_GameController *gamecontroller) );
     276NV_SDL_FUN( int , SDL_GameControllerEventState, (int state) );
     277NV_SDL_FUN( void , SDL_GameControllerUpdate, (void) );
     278NV_SDL_FUN( SDL_GameControllerAxis , SDL_GameControllerGetAxisFromString, (const char *pchString) );
     279NV_SDL_FUN( const char* , SDL_GameControllerGetStringForAxis, (SDL_GameControllerAxis axis) );
     280NV_SDL_FUN( SDL_GameControllerButtonBind , SDL_GameControllerGetBindForAxis, (SDL_GameController *gamecontroller,SDL_GameControllerAxis axis) );
     281NV_SDL_FUN( Sint16 , SDL_GameControllerGetAxis, (SDL_GameController *gamecontroller,SDL_GameControllerAxis axis) );
     282NV_SDL_FUN( SDL_GameControllerButton , SDL_GameControllerGetButtonFromString, (const char *pchString) );
     283NV_SDL_FUN( const char* , SDL_GameControllerGetStringForButton, (SDL_GameControllerButton button) );
     284NV_SDL_FUN( SDL_GameControllerButtonBind , SDL_GameControllerGetBindForButton, (SDL_GameController *gamecontroller,SDL_GameControllerButton button) );
     285NV_SDL_FUN( Uint8 , SDL_GameControllerGetButton, (SDL_GameController *gamecontroller,SDL_GameControllerButton button) );
     286NV_SDL_FUN( void , SDL_GameControllerClose, (SDL_GameController *gamecontroller) );
     287
     288/* SDL_hints.h functions */
     289NV_SDL_FUN( SDL_bool , SDL_SetHintWithPriority, (const char *name,const char *value,SDL_HintPriority priority) );
     290NV_SDL_FUN( SDL_bool , SDL_SetHint, (const char *name,const char *value) );
     291NV_SDL_FUN( const char * , SDL_GetHint, (const char *name) );
     292NV_SDL_FUN( void , SDL_ClearHints, (void) );
     293
     294/* SDL_main.h functions */
     295NV_SDL_FUN( void , SDL_SetMainReady, (void) );
     296// NV_SDL_FUN( int , SDL_RegisterApp, (char *name, Uint32 style,void *hInst) );
     297// NV_SDL_FUN( void , SDL_UnregisterApp, (void) );
     298
     299/* SDL_messagebox.h functions */
     300NV_SDL_FUN( int , SDL_ShowMessageBox, (const SDL_MessageBoxData *messageboxdata, int *buttonid) );
     301NV_SDL_FUN( int , SDL_ShowSimpleMessageBox, (Uint32 flags, const char *title, const char *message, SDL_Window *window) );
     302
     303/* SDL_pixels.h functions */
     304NV_SDL_FUN( const char* , SDL_GetPixelFormatName, (Uint32 format) );
     305NV_SDL_FUN( SDL_bool , SDL_PixelFormatEnumToMasks, (Uint32 format,int *bpp,Uint32 * Rmask,Uint32 * Gmask,Uint32 * Bmask,Uint32 * Amask) );
     306NV_SDL_FUN( Uint32 , SDL_MasksToPixelFormatEnum, (int bpp,Uint32 Rmask,Uint32 Gmask,Uint32 Bmask,Uint32 Amask) );
     307NV_SDL_FUN( SDL_PixelFormat * , SDL_AllocFormat, (Uint32 pixel_format) );
     308NV_SDL_FUN( void , SDL_FreeFormat, (SDL_PixelFormat *format) );
     309NV_SDL_FUN( SDL_Palette *, SDL_AllocPalette, (int ncolors) );
     310NV_SDL_FUN( int , SDL_SetPixelFormatPalette, (SDL_PixelFormat * format,SDL_Palette *palette) );
     311NV_SDL_FUN( int , SDL_SetPaletteColors, (SDL_Palette * palette,const SDL_Color * colors,int firstcolor, int ncolors) );
     312NV_SDL_FUN( void , SDL_FreePalette, (SDL_Palette * palette) );
     313NV_SDL_FUN( Uint32 , SDL_MapRGB, (const SDL_PixelFormat * format,Uint8 r, Uint8 g, Uint8 b) );
     314NV_SDL_FUN( Uint32 , SDL_MapRGBA, (const SDL_PixelFormat * format,Uint8 r, Uint8 g, Uint8 b,Uint8 a) );
     315NV_SDL_FUN( void , SDL_GetRGB, (Uint32 pixel,const SDL_PixelFormat * format,Uint8 * r, Uint8 * g, Uint8 * b) );
     316NV_SDL_FUN( void , SDL_GetRGBA, (Uint32 pixel,const SDL_PixelFormat * format,Uint8 * r, Uint8 * g, Uint8 * b,Uint8 * a) );
     317NV_SDL_FUN( void , SDL_CalculateGammaRamp, (float gamma, Uint16 * ramp) ); 
     318
     319/* SDL_platform.h functions */
     320NV_SDL_FUN( const char * , SDL_GetPlatform , (void) );
     321
     322/* SDL_power.h functions */
     323NV_SDL_FUN( SDL_PowerState , SDL_GetPowerInfo, (int *secs, int *pct) );
     324
     325/* SDL_renderer.h functions */
     326NV_SDL_FUN( int , SDL_GetNumRenderDrivers, (void) );
     327NV_SDL_FUN( int , SDL_GetRenderDriverInfo, (int index,SDL_RendererInfo * info) );
     328NV_SDL_FUN( int , SDL_CreateWindowAndRenderer, (int width, int height, Uint32 window_flags,SDL_Window **window, SDL_Renderer **renderer) );
     329NV_SDL_FUN( SDL_Renderer * , SDL_CreateRenderer, (SDL_Window * window,int index, Uint32 flags) );
     330NV_SDL_FUN( SDL_Renderer * , SDL_CreateSoftwareRenderer, (SDL_Surface * surface) );
     331NV_SDL_FUN( SDL_Renderer * , SDL_GetRenderer, (SDL_Window * window) );
     332NV_SDL_FUN( int , SDL_GetRendererInfo, (SDL_Renderer * renderer,SDL_RendererInfo * info) );
     333NV_SDL_FUN( int , SDL_GetRendererOutputSize, (SDL_Renderer * renderer,int *w, int *h) );
     334NV_SDL_FUN( SDL_Texture * , SDL_CreateTexture, (SDL_Renderer * renderer,Uint32 format,int access, int w,int h) );
     335NV_SDL_FUN( SDL_Texture * , SDL_CreateTextureFromSurface, (SDL_Renderer * renderer, SDL_Surface * surface) );
     336NV_SDL_FUN( int , SDL_QueryTexture, (SDL_Texture * texture,Uint32 * format, int *access,int *w, int *h) );
     337NV_SDL_FUN( int , SDL_SetTextureColorMod, (SDL_Texture * texture,Uint8 r, Uint8 g, Uint8 b) );
     338NV_SDL_FUN( int , SDL_GetTextureColorMod, (SDL_Texture * texture,Uint8 * r, Uint8 * g,Uint8 * b) );
     339NV_SDL_FUN( int , SDL_SetTextureAlphaMod, (SDL_Texture * texture,Uint8 alpha) );
     340NV_SDL_FUN( int , SDL_GetTextureAlphaMod, (SDL_Texture * texture,Uint8 * alpha) );
     341NV_SDL_FUN( int , SDL_SetTextureBlendMode, (SDL_Texture * texture,SDL_BlendMode blendMode) );
     342NV_SDL_FUN( int , SDL_GetTextureBlendMode, (SDL_Texture * texture,SDL_BlendMode *blendMode) );
     343NV_SDL_FUN( int , SDL_UpdateTexture, (SDL_Texture * texture,const SDL_Rect * rect,const void *pixels, int pitch) );
     344NV_SDL_FUN( int , SDL_LockTexture, (SDL_Texture * texture,const SDL_Rect * rect,void **pixels, int *pitch) );
     345NV_SDL_FUN( void , SDL_UnlockTexture, (SDL_Texture * texture) );
     346NV_SDL_FUN( SDL_bool , SDL_RenderTargetSupported, (SDL_Renderer *renderer) );
     347NV_SDL_FUN( int , SDL_SetRenderTarget, (SDL_Renderer *renderer,SDL_Texture *texture) );
     348NV_SDL_FUN( SDL_Texture * , SDL_GetRenderTarget, (SDL_Renderer *renderer) );
     349NV_SDL_FUN( int , SDL_RenderSetLogicalSize, (SDL_Renderer * renderer, int w, int h) );
     350NV_SDL_FUN( void , SDL_RenderGetLogicalSize, (SDL_Renderer * renderer, int *w, int *h) );
     351NV_SDL_FUN( int , SDL_RenderSetViewport, (SDL_Renderer * renderer,const SDL_Rect * rect) );
     352NV_SDL_FUN( void , SDL_RenderGetViewport, (SDL_Renderer * renderer,SDL_Rect * rect) );
     353NV_SDL_FUN( int , SDL_RenderSetClipRect, (SDL_Renderer * renderer,const SDL_Rect * rect) );
     354NV_SDL_FUN( void , SDL_RenderGetClipRect, (SDL_Renderer * renderer,SDL_Rect * rect) );
     355NV_SDL_FUN( int , SDL_RenderSetScale, (SDL_Renderer * renderer,float scaleX, float scaleY) );
     356NV_SDL_FUN( void , SDL_RenderGetScale, (SDL_Renderer * renderer,float *scaleX, float *scaleY) );
     357NV_SDL_FUN( int , SDL_SetRenderDrawColor, (SDL_Renderer * renderer,Uint8 r, Uint8 g, Uint8 b,Uint8 a) );
     358NV_SDL_FUN( int , SDL_GetRenderDrawColor, (SDL_Renderer * renderer,Uint8 * r, Uint8 * g, Uint8 * b,Uint8 * a) );
     359NV_SDL_FUN( int , SDL_SetRenderDrawBlendMode, (SDL_Renderer * renderer,SDL_BlendMode blendMode) );
     360NV_SDL_FUN( int , SDL_GetRenderDrawBlendMode, (SDL_Renderer * renderer,SDL_BlendMode *blendMode) );
     361NV_SDL_FUN( int , SDL_RenderClear, (SDL_Renderer * renderer) );
     362NV_SDL_FUN( int , SDL_RenderDrawPoint, (SDL_Renderer * renderer,int x, int y) );
     363NV_SDL_FUN( int , SDL_RenderDrawPoints, (SDL_Renderer * renderer,const SDL_Point * points,int count) );
     364NV_SDL_FUN( int , SDL_RenderDrawLine, (SDL_Renderer * renderer,int x1, int y1, int x2, int y2) );
     365NV_SDL_FUN( int , SDL_RenderDrawLines, (SDL_Renderer * renderer,const SDL_Point * points,int count) );
     366NV_SDL_FUN( int , SDL_RenderDrawRect, (SDL_Renderer * renderer,const SDL_Rect * rect) );
     367NV_SDL_FUN( int , SDL_RenderDrawRects, (SDL_Renderer * renderer,const SDL_Rect * rects,int count) );
     368NV_SDL_FUN( int , SDL_RenderFillRect, (SDL_Renderer * renderer,const SDL_Rect * rect) );
     369NV_SDL_FUN( int , SDL_RenderFillRects, (SDL_Renderer * renderer,const SDL_Rect * rects,int count) );
     370NV_SDL_FUN( int , SDL_RenderCopy, (SDL_Renderer * renderer,SDL_Texture * texture,const SDL_Rect * srcrect,const SDL_Rect * dstrect) );
     371NV_SDL_FUN( int , SDL_RenderCopyEx, (SDL_Renderer * renderer,SDL_Texture * texture,const SDL_Rect * srcrect,const SDL_Rect * dstrect,const double angle,const SDL_Point *center,const SDL_RendererFlip flip) );
     372NV_SDL_FUN( int , SDL_RenderReadPixels, (SDL_Renderer * renderer,const SDL_Rect * rect,Uint32 format,void *pixels, int pitch) );
     373NV_SDL_FUN( void , SDL_RenderPresent, (SDL_Renderer * renderer) );
     374NV_SDL_FUN( void , SDL_DestroyTexture, (SDL_Texture * texture) );
     375NV_SDL_FUN( void , SDL_DestroyRenderer, (SDL_Renderer * renderer) );
     376NV_SDL_FUN( int , SDL_GL_BindTexture, (SDL_Texture *texture, float *texw, float *texh) );
     377NV_SDL_FUN( int , SDL_GL_UnbindTexture, (SDL_Texture *texture) );
     378
     379/* SDL_shape.h functions */
     380NV_SDL_FUN( int , SDL_SetWindowShape, (SDL_Window *window,SDL_Surface *shape,SDL_WindowShapeMode *shape_mode) );
     381NV_SDL_FUN( int , SDL_GetShapedWindowMode, (SDL_Window *window,SDL_WindowShapeMode *shape_mode) );
     382
     383/* SDL_surface.h functions */
     384NV_SDL_FUN( int , SDL_SetSurfacePalette, (SDL_Surface * surface,SDL_Palette * palette) );
     385NV_SDL_FUN( int , SDL_SetSurfaceRLE, (SDL_Surface * surface,int flag) );
     386NV_SDL_FUN( int , SDL_SetColorKey, (SDL_Surface * surface,int flag, Uint32 key) );
     387NV_SDL_FUN( int , SDL_GetColorKey, (SDL_Surface * surface,Uint32 * key) );
     388NV_SDL_FUN( int , SDL_SetSurfaceColorMod, (SDL_Surface * surface,Uint8 r, Uint8 g, Uint8 b) );
     389NV_SDL_FUN( int , SDL_GetSurfaceColorMod, (SDL_Surface * surface,Uint8 * r, Uint8 * g,Uint8 * b) );
     390NV_SDL_FUN( int , SDL_SetSurfaceAlphaMod, (SDL_Surface * surface,Uint8 alpha) );
     391NV_SDL_FUN( int , SDL_GetSurfaceAlphaMod, (SDL_Surface * surface,Uint8 * alpha) );
     392NV_SDL_FUN( int , SDL_SetSurfaceBlendMode, (SDL_Surface * surface,SDL_BlendMode blendMode) );
     393NV_SDL_FUN( int , SDL_GetSurfaceBlendMode, (SDL_Surface * surface,SDL_BlendMode *blendMode) );
     394
     395NV_SDL_FUN( SDL_Surface *, SDL_ConvertSurfaceFormat, (SDL_Surface * src, Uint32 pixel_format, Uint32 flags) );
     396NV_SDL_FUN( int , SDL_ConvertPixels, (int width, int height,Uint32 src_format,const void * src, int src_pitch,Uint32 dst_format,void * dst, int dst_pitch) );
     397NV_SDL_FUN( int , SDL_FillRect, (SDL_Surface * dst, const SDL_Rect * rect, Uint32 color) );
     398NV_SDL_FUN( int , SDL_FillRects, (SDL_Surface * dst, const SDL_Rect * rects, int count, Uint32 color) );
     399NV_SDL_FUN( int , SDL_UpperBlit, (SDL_Surface * src, const SDL_Rect * srcrect,SDL_Surface * dst, SDL_Rect * dstrect) );
     400NV_SDL_FUN( int , SDL_LowerBlit, (SDL_Surface * src, SDL_Rect * srcrect,SDL_Surface * dst, SDL_Rect * dstrect) );
     401NV_SDL_FUN( int , SDL_SoftStretch, (SDL_Surface * src,const SDL_Rect * srcrect,SDL_Surface * dst,const SDL_Rect * dstrect) );
     402NV_SDL_FUN( int , SDL_UpperBlitScaled, (SDL_Surface * src, const SDL_Rect * srcrect,SDL_Surface * dst, SDL_Rect * dstrect) );
     403NV_SDL_FUN( int , SDL_LowerBlitScaled, (SDL_Surface * src, SDL_Rect * srcrect,SDL_Surface * dst, SDL_Rect * dstrect) );
     404NV_SDL_FUN( int , SDL_GetNumTouchDevices, (void) );
     405NV_SDL_FUN( SDL_TouchID , SDL_GetTouchDevice, (int index) );
     406NV_SDL_FUN( int , SDL_GetNumTouchFingers, (SDL_TouchID touchID) );
     407NV_SDL_FUN( SDL_Finger * , SDL_GetTouchFinger, (SDL_TouchID touchID, int index) );
     408
     409NV_SDL_FUN( char *, SDL_getenv, (const char *name) );
     410NV_SDL_FUN( int , SDL_setenv, (const char *name, const char *value, int overwrite) );
     411NV_SDL_FUN( int , SDL_isdigit, (int x) );
     412NV_SDL_FUN( int , SDL_isspace, (int x) );
     413NV_SDL_FUN( int , SDL_toupper, (int x) );
     414NV_SDL_FUN( int , SDL_tolower, (int x) );
  • trunk/nv/lib/sdl.hh

    r319 r325  
    1313//#define NV_SDL_SHARED
    1414
    15 #define NV_SDL_C      0
    16 #define NV_SDL_12     1
    17 #define NV_SDL_20     2
    18 
    19 #if !defined(NV_SDL_VERSION)
    20 #       define NV_SDL_VERSION     NV_SDL_20
    21 #endif
    22 
    2315#if NV_PLATFORM == NV_WINDOWS
    24 #       define NV_SDL_PATH_12 "SDL.dll"
    25 #       define NV_SDL_PATH_20 "SDL2.dll"
     16#       define NV_SDL_PATH "SDL2.dll"
    2617#elif NV_PLATFORM == NV_APPLE
    27 #       define NV_SDL_PATH_12 "SDL.framework/SDL"
    28 #       define NV_SDL_PATH_20 "SDL2.framework/SDL"
     18#       define NV_SDL_PATH "SDL2.framework/SDL"
    2919#else
    30 #       define NV_SDL_PATH_12 "libSDL-1.2.so.0"
    31 #       define NV_SDL_PATH_20 "libSDL-1.2.so.0"
    32 #endif
    33 
    34 #if NV_SDL_VERSION == NV_SDL_12
    35 #       define NV_SDL_PATH NV_SDL_PATH_12
    36 #elif NV_SDL_VERSION == NV_SDL_20
    37 #       define NV_SDL_PATH NV_SDL_PATH_20
    38 #elif NV_SDL_VERSION == NV_SDL_C
    39 #       define NV_SDL_PATH nullptr
    40 #else
    41 #       error "Unrecognized NV_SDL_VERSION!"
     20#       define NV_SDL_PATH "libSDL2-2.0.so.0"
    4221#endif
    4322
     
    9170/* SDL.h defines */
    9271
    93 #define SDL_INIT_TIMER          0x00000001
    94 #define SDL_INIT_AUDIO          0x00000010
    95 #define SDL_INIT_VIDEO          0x00000020
    96 #define SDL_INIT_JOYSTICK       0x00000200
    97 #if NV_SDL_VERSION == NV_SDL_20
    98 #define SDL_INIT_NOPARACHUTE    0x00100000
    99 #define SDL_INIT_EVENTTHREAD    0x01000000
    100 #define SDL_INIT_EVERYTHING     0x0000FFFF
    101 #else
     72#define SDL_INIT_TIMER                  0x00000001
     73#define SDL_INIT_AUDIO                  0x00000010
     74#define SDL_INIT_VIDEO                  0x00000020
     75#define SDL_INIT_JOYSTICK               0x00000200
    10276#define SDL_INIT_HAPTIC         0x00001000
    10377#define SDL_INIT_GAMECONTROLLER 0x00002000
     
    10882        SDL_INIT_JOYSTICK | SDL_INIT_HAPTIC | SDL_INIT_GAMECONTROLLER \
    10983        )
    110 #endif
    11184
    11285#define SDL_reinterpret_cast(type, expression) reinterpret_cast<type>(expression)
     
    132105/* SDL_rwops.h defines */
    133106typedef struct SDL_RWops {
    134 #if NV_SDL_VERSION == NV_SDL_20
    135107        Sint64 (NV_SDL_APIENTRY *size)(struct SDL_RWops *context);
    136108        Sint64 (NV_SDL_APIENTRY *seek)(struct SDL_RWops *context, Sint64 offset, int whence);
    137109        size_t (NV_SDL_APIENTRY *read)(struct SDL_RWops *context, void *ptr, size_t size, size_t maxnum);
    138110        size_t (NV_SDL_APIENTRY *write)(struct SDL_RWops *context, const void *ptr, size_t size, size_t num);
    139 #else
    140         int (NV_SDL_APIENTRY *seek)(struct SDL_RWops *context, int offset, int whence);
    141         int (NV_SDL_APIENTRY *read)(struct SDL_RWops *context, void *ptr, int size, int maxnum);
    142         int (NV_SDL_APIENTRY *write)(struct SDL_RWops *context, const void *ptr, int size, int num);
    143 #endif
    144111        int (NV_SDL_APIENTRY *close)(struct SDL_RWops *context);
    145112
     
    178145#define SDL_ALPHA_TRANSPARENT 0
    179146
    180 #if NV_SDL_VERSION == NV_SDL_20
    181147typedef struct
    182148{
     
    189155        int w, h;
    190156} SDL_Rect;
    191 #else
    192 typedef struct SDL_Rect {
    193         Sint16 x, y;
    194         Uint16 w, h;
    195 } SDL_Rect;
    196 #endif
    197157
    198158typedef struct SDL_Color {
     
    200160        Uint8 g;
    201161        Uint8 b;
    202 #if NV_SDL_VERSION == NV_SDL_20
    203162        Uint8 unused;
    204 #else
    205         Uint8 a;
    206 #endif
    207163} SDL_Color;
    208164
     
    210166        int       ncolors;
    211167        SDL_Color *colors;
    212 #if NV_SDL_VERSION == NV_SDL_20
    213168        Uint32    version;
    214169        int       refcount;
    215 #endif
    216 
    217170} SDL_Palette;
    218171
    219 #if NV_SDL_VERSION == NV_SDL_20
    220172#define SDL_RWOPS_UNKNOWN   0
    221173#define SDL_RWOPS_WINFILE   1
     
    224176#define SDL_RWOPS_MEMORY    4
    225177#define SDL_RWOPS_MEMORY_RO 5
    226 #endif
    227 
    228 /* SDL_pixels.h defines (2.0 only) */
    229 #if NV_SDL_VERSION == NV_SDL_20
     178
     179/* SDL_pixels.h defines */
    230180enum
    231181{
     
    429379        SDL_POWERSTATE_CHARGED
    430380} SDL_PowerState;
    431 #endif
    432 
    433 #if NV_SDL_VERSION == NV_SDL_20
    434381
    435382typedef enum
     
    462409        struct SDL_PixelFormat *next;
    463410} SDL_PixelFormat;
    464 #else
    465 typedef struct SDL_PixelFormat {
    466         SDL_Palette *palette;
    467         Uint8  BitsPerPixel;
    468         Uint8  BytesPerPixel;
    469         Uint8  Rloss;
    470         Uint8  Gloss;
    471         Uint8  Bloss;
    472         Uint8  Aloss;
    473         Uint8  Rshift;
    474         Uint8  Gshift;
    475         Uint8  Bshift;
    476         Uint8  Ashift;
    477         Uint32 Rmask;
    478         Uint32 Gmask;
    479         Uint32 Bmask;
    480         Uint32 Amask;
    481 
    482         Uint32 colorkey;
    483         Uint8  alpha;
    484 } SDL_PixelFormat;
    485 #endif
    486 
    487 #if NV_SDL_VERSION == NV_SDL_20
     411
    488412typedef struct
    489413{
     
    494418        void *driverdata;
    495419} SDL_DisplayMode;
    496 #endif
    497 
    498 #if NV_SDL_VERSION == NV_SDL_20
     420
    499421typedef struct SDL_Surface
    500422{
     
    511433        int refcount;
    512434} SDL_Surface;
    513 #else
    514 typedef struct SDL_Surface
    515 {
    516         Uint32 flags;
    517         SDL_PixelFormat *format;
    518         int w, h;
    519         Uint16 pitch;
    520         void *pixels;
    521         int offset;     
    522         struct private_hwdata *hwdata;
    523         SDL_Rect clip_rect;
    524         Uint32 unused1;
    525         Uint32 locked;
    526         struct SDL_BlitMap *map;
    527         unsigned int format_version;
    528         int refcount;
    529 } SDL_Surface;
    530 #endif
    531 
    532 #if NV_SDL_VERSION == NV_SDL_20
     435
    533436#define SDL_SWSURFACE       0         
    534437#define SDL_PREALLOC        0x00000001
     
    537440
    538441#define SDL_MUSTLOCK(S) (((S)->flags & SDL_RLEACCEL) != 0)
    539 #else
    540 #define SDL_SWSURFACE   0x00000000     
    541 #define SDL_HWSURFACE   0x00000001     
    542 #define SDL_ASYNCBLIT   0x00000004     
    543 #define SDL_ANYFORMAT   0x10000000     
    544 #define SDL_HWPALETTE   0x20000000     
    545 #define SDL_DOUBLEBUF   0x40000000     
    546 #define SDL_FULLSCREEN  0x80000000     
    547 #define SDL_OPENGL      0x00000002 
    548 #define SDL_OPENGLBLIT  0x0000000A     
    549 #define SDL_RESIZABLE   0x00000010     
    550 #define SDL_NOFRAME     0x00000020     
    551 #define SDL_HWACCEL     0x00000100     
    552 #define SDL_SRCCOLORKEY 0x00001000     
    553 #define SDL_RLEACCELOK  0x00002000     
    554 #define SDL_RLEACCEL    0x00004000     
    555 #define SDL_SRCALPHA    0x00010000     
    556 #define SDL_PREALLOC    0x01000000     
    557 
    558 #define SDL_MUSTLOCK(surface)   \
    559         (surface->offset ||             \
    560         ((surface->flags & (SDL_HWSURFACE|SDL_ASYNCBLIT|SDL_RLEACCEL)) != 0))
    561 
    562 #endif
    563 
     442#
    564443typedef int (*SDL_blit)(struct SDL_Surface *src, SDL_Rect *srcrect,
    565444                        struct SDL_Surface *dst, SDL_Rect *dstrect);
    566445
    567 #if NV_SDL_VERSION == NV_SDL_12
    568 typedef struct SDL_VideoInfo {
    569         Uint32 hw_available :1;
    570         Uint32 wm_available :1;
    571         Uint32 UnusedBits1  :6;
    572         Uint32 UnusedBits2  :1;
    573         Uint32 blit_hw      :1;
    574         Uint32 blit_hw_CC   :1;
    575         Uint32 blit_hw_A    :1;
    576         Uint32 blit_sw      :1;
    577         Uint32 blit_sw_CC   :1;
    578         Uint32 blit_sw_A    :1;
    579         Uint32 blit_fill    :1;
    580         Uint32 UnusedBits3  :16;
    581         Uint32 video_mem;
    582         SDL_PixelFormat *vfmt;
    583         int    current_w;
    584         int    current_h;
    585 } SDL_VideoInfo;
    586 #endif
    587 
    588 #if NV_SDL_VERSION == NV_SDL_20
    589446typedef enum
    590447{
     
    715572
    716573typedef void *SDL_GLContext;
    717 #endif
    718 
    719574
    720575typedef enum {
     
    735590    SDL_GL_MULTISAMPLESAMPLES,
    736591    SDL_GL_ACCELERATED_VISUAL,
    737 #if NV_SDL_VERSION == NV_SDL_12
    738     SDL_GL_SWAP_CONTROL
    739 #else
    740592        SDL_GL_RETAINED_BACKING,
    741593        SDL_GL_CONTEXT_MAJOR_VERSION,
     
    745597        SDL_GL_CONTEXT_PROFILE_MASK,
    746598        SDL_GL_SHARE_WITH_CURRENT_CONTEXT
    747 #endif
    748599} SDL_GLattr;
    749600
    750 #if NV_SDL_VERSION == NV_SDL_20
    751601typedef enum
    752602{
     
    763613        SDL_GL_CONTEXT_RESET_ISOLATION_FLAG    = 0x0008
    764614} SDL_GLcontextFlag;
    765 #endif
    766 
    767 #if NV_SDL_VERSION == NV_SDL_12
     615
    768616typedef enum {
    769617        SDL_GRAB_QUERY = -1,
     
    772620        SDL_GRAB_FULLSCREEN     /**< Used internally */
    773621} SDL_GrabMode;
    774 #endif
    775622
    776623/* SDL_audio.h defines */
     
    783630#define AUDIO_U16       AUDIO_U16LSB
    784631#define AUDIO_S16       AUDIO_S16LSB
    785 
    786 #if NV_SDL_VERSION == NV_SDL_20
    787632#define AUDIO_S32LSB    0x8020
    788633#define AUDIO_S32MSB    0x9020
     
    791636#define AUDIO_F32MSB    0x9120
    792637#define AUDIO_F32       AUDIO_F32LSB
    793 #endif
    794638
    795639/* NOTE : assuming LSB! */
    796640#define AUDIO_U16SYS    AUDIO_U16LSB
    797641#define AUDIO_S16SYS    AUDIO_S16LSB
    798 #if NV_SDL_VERSION == NV_SDL_20
    799642#define AUDIO_S32SYS    AUDIO_S32LSB
    800643#define AUDIO_F32SYS    AUDIO_F32LSB
    801 #endif
    802644
    803645typedef Uint16 SDL_AudioFormat;
     
    843685typedef SDL_audiostatus SDL_AudioStatus;
    844686
    845 #if NV_SDL_VERSION == NV_SDL_20
    846687#define SDL_AUDIO_ALLOW_FREQUENCY_CHANGE    0x00000001
    847688#define SDL_AUDIO_ALLOW_FORMAT_CHANGE       0x00000002
    848689#define SDL_AUDIO_ALLOW_CHANNELS_CHANGE     0x00000004
    849690#define SDL_AUDIO_ALLOW_ANY_CHANGE          (SDL_AUDIO_ALLOW_FREQUENCY_CHANGE|SDL_AUDIO_ALLOW_FORMAT_CHANGE|SDL_AUDIO_ALLOW_CHANNELS_CHANGE)
    850 #endif
    851691
    852692#define SDL_MIX_MAXVOLUME 128
    853693
    854 #if NV_SDL_VERSION == NV_SDL_20
    855694/* SDL_hints.h defines */
    856695#define SDL_HINT_FRAMEBUFFER_ACCELERATION   "SDL_FRAMEBUFFER_ACCELERATION"
     
    876715    SDL_HINT_OVERRIDE
    877716} SDL_HintPriority;
    878 #endif
    879 
    880 #if NV_SDL_VERSION == NV_SDL_20
     717
    881718/* SDL_messagebox.h defines */
    882719typedef enum
     
    932769    const SDL_MessageBoxColorScheme *colorScheme;
    933770} SDL_MessageBoxData;
    934 #endif
    935 
    936 
    937 /* SDL_active.h defines */
    938 #if NV_SDL_VERSION == NV_SDL_12
    939 #define SDL_APPMOUSEFOCUS       0x01
    940 #define SDL_APPINPUTFOCUS       0x02
    941 #define SDL_APPACTIVE           0x04
    942 #endif
    943771
    944772/* SDL_keyboard.h defines */
    945 #if NV_SDL_VERSION == NV_SDL_20
    946 #include <nv/lib/detail/sdl_keys_20.inc>
    947 #else
    948 #include <nv/lib/detail/sdl_keys_12.inc>
    949 #endif
     773#include <nv/lib/detail/sdl_keys.inc>
    950774
    951775typedef enum {
     
    978802#define SDL_DEFAULT_REPEAT_INTERVAL     30
    979803
    980 #if NV_SDL_VERSION == NV_SDL_12
    981 typedef struct SDL_keysym {
    982         Uint8 scancode;
    983         SDLKey sym;
    984         SDLMod mod;
    985         Uint16 unicode;
    986 } SDL_keysym;
    987 
    988 #define SDL_ALL_HOTKEYS         0xFFFFFFFF
    989 #else
    990804typedef Sint32 SDL_Keycode;
    991805typedef struct SDL_Keysym
     
    996810        Uint32 unused;
    997811} SDL_Keysym;
    998 #endif
    999812
    1000813/* SDL_mouse.h defines */
    1001 #if NV_SDL_VERSION == NV_SDL_20
    1002814typedef enum
    1003815{
     
    1016828        SDL_NUM_SYSTEM_CURSORS
    1017829} SDL_SystemCursor;
    1018 #endif
    1019830
    1020831typedef struct WMcursor WMcursor;
     
    1032843#define SDL_BUTTON_MIDDLE       2
    1033844#define SDL_BUTTON_RIGHT        3
    1034 #if NV_SDL_VERSION == NV_SDL_20
    1035845#define SDL_BUTTON_X1           4
    1036846#define SDL_BUTTON_X2           5
    1037 #else
    1038 #define SDL_BUTTON_WHEELUP      4
    1039 #define SDL_BUTTON_WHEELDOWN    5
    1040 #define SDL_BUTTON_X1           6
    1041 #define SDL_BUTTON_X2           7
    1042 #endif
    1043847#define SDL_BUTTON_LMASK        SDL_BUTTON(SDL_BUTTON_LEFT)
    1044848#define SDL_BUTTON_MMASK        SDL_BUTTON(SDL_BUTTON_MIDDLE)
     
    1052856typedef struct _SDL_Joystick SDL_Joystick;
    1053857
    1054 #if NV_SDL_VERSION == NV_SDL_20
    1055858typedef struct {
    1056859        Uint8 data[16];
     
    1058861
    1059862typedef Sint32 SDL_JoystickID;
    1060 #endif
    1061 
    1062863
    1063864#define SDL_HAT_CENTERED        0x00
     
    1076877#define SDL_PRESSED     1
    1077878
    1078 /* SDL_gamecontroller.h defines  (2.0 only)*/
    1079 #if  NV_SDL_VERSION == NV_SDL_20
     879/* SDL_gamecontroller.h defines */
    1080880struct _SDL_GameController;
    1081881typedef struct _SDL_GameController SDL_GameController;
     
    1138938
    1139939typedef Sint64 SDL_GestureID;
    1140 #endif
    1141 
    1142 #if NV_SDL_VERSION == NV_SDL_12
    1143 #include <nv/lib/detail/sdl_events_12.inc>
    1144 #else
    1145 #include <nv/lib/detail/sdl_events_20.inc>
    1146 #endif
    1147 
    1148 #if NV_SDL_VERSION == NV_SDL_20
     940
     941#include <nv/lib/detail/sdl_events.inc>
     942
    1149943typedef int (NV_SDL_APIENTRY * SDL_EventFilter) (void *userdata, SDL_Event * event);
    1150 #endif
    1151944
    1152945#define SDL_QUERY       -1
     
    1156949
    1157950/* SDL_timer.h defines */
    1158 #if  NV_SDL_VERSION == NV_SDL_20
    1159951typedef Uint32 (NV_SDL_APIENTRY *SDL_TimerCallback)(Uint32 interval, void *param);
    1160952typedef int SDL_TimerID;
    1161 #else
    1162 #define SDL_TIMESLICE           10
    1163 #define TIMER_RESOLUTION        10
    1164 typedef Uint32 (NV_SDL_APIENTRY *SDL_TimerCallback)(Uint32 interval, void *param);
    1165 typedef struct _SDL_TimerID *SDL_TimerID;
    1166 #endif
    1167953
    1168954/* SDL_version.h defines */
     
    1173959} SDL_version;
    1174960
    1175 #if  NV_SDL_VERSION == NV_SDL_20
    1176961#define SDL_MAJOR_VERSION   2
    1177962#define SDL_MINOR_VERSION   0
    1178963#define SDL_PATCHLEVEL      0
    1179 #else
    1180 #define SDL_MAJOR_VERSION   1
    1181 #define SDL_MINOR_VERSION   2
    1182 #define SDL_PATCHLEVEL      15
    1183 #endif
    1184964
    1185965#if defined(NV_SDL_DYNAMIC)
     
    1189969#endif
    1190970#include <nv/lib/detail/sdl_functions.inc>
    1191 #if NV_SDL_VERSION == NV_SDL_12
    1192 #include <nv/lib/detail/sdl_functions_12.inc>
    1193 #elif NV_SDL_VERSION == NV_SDL_20
    1194 #include <nv/lib/detail/sdl_functions_20.inc>
    1195 #endif
    1196971#undef NV_SDL_FUN
    1197972
  • trunk/nv/lib/sdl_image.hh

    r319 r325  
    1212
    1313#if NV_PLATFORM == NV_WINDOWS
    14 #       define NV_SDL_IMAGE_PATH_12 "SDL_image.dll"
    15 #       define NV_SDL_IMAGE_PATH_20 "SDL2_image.dll"
     14#       define NV_SDL_IMAGE_PATH "SDL2_image.dll"
    1615#elif NV_PLATFORM == NV_APPLE
    17 #       define NV_SDL_IMAGE_PATH_12 "SDL_image.framework/SDL_image"
    18 #       define NV_SDL_IMAGE_PATH_20 "SDL2_image.framework/SDL_image"
     16#       define NV_SDL_IMAGE_PATH "SDL2_image.framework/SDL_image"
    1917#else
    20 #       define NV_SDL_IMAGE_PATH_12 "libSDL_image-1.2.so.0"
    21 #       define NV_SDL_IMAGE_PATH_20 "libSDL2_image-2.0.so.0"
    22 #endif
    23 
    24 #if NV_SDL_VERSION == NV_SDL_12
    25 #       define NV_SDL_IMAGE_PATH NV_SDL_IMAGE_PATH_12
    26 #elif NV_SDL_VERSION == NV_SDL_20
    27 #       define NV_SDL_IMAGE_PATH NV_SDL_IMAGE_PATH_20
    28 #elif NV_SDL_VERSION == NV_SDL_C
    29 #       define NV_SDL_IMAGE_PATH nullptr
    30 #else
    31 #       error "Unrecognized NV_SDL_VERSION!"
     18#       define NV_SDL_IMAGE_PATH "libSDL2_image-2.0.so.0"
    3219#endif
    3320
     
    3522
    3623/** SDL_image defines */
    37 #if NV_SDL_VERSION == NV_SDL_20
    3824#define SDL_IMAGE_MAJOR_VERSION 2
    3925#define SDL_IMAGE_MINOR_VERSION 0
    4026#define SDL_IMAGE_PATCHLEVEL    0
    41 #else
    42 #define SDL_IMAGE_MAJOR_VERSION 1
    43 #define SDL_IMAGE_MINOR_VERSION 2
    44 #define SDL_IMAGE_PATCHLEVEL    11
    45 #endif
    4627
    4728#define SDL_IMAGE_VERSION(X)                                            \
  • trunk/nv/lib/sdl_mixer.hh

    r319 r325  
    1212
    1313#if NV_PLATFORM == NV_WINDOWS
    14 #       define NV_SDL_MIXER_PATH_12 "SDL_mixer.dll"
    15 #       define NV_SDL_MIXER_PATH_20 "SDL2_mixer.dll"
     14#       define NV_SDL_MIXER_PATH "SDL2_mixer.dll"
    1615#elif NV_PLATFORM == NV_APPLE
    17 #       define NV_SDL_MIXER_PATH_12 "SDL_mixer.framework/SDL_mixer"
    18 #       define NV_SDL_MIXER_PATH_20 "SDL2_mixer.framework/SDL_mixer"
     16#       define NV_SDL_MIXER_PATH "SDL2_mixer.framework/SDL_mixer"
    1917#else
    20 #       define NV_SDL_MIXER_PATH_12 "libSDL_mixer-1.2.so.0"
    21 #       define NV_SDL_MIXER_PATH_20 "libSDL2_mixer-2.0.so.0"
    22 #endif
    23 
    24 #if NV_SDL_VERSION == NV_SDL_12
    25 #       define NV_SDL_MIXER_PATH NV_SDL_MIXER_PATH_12
    26 #elif NV_SDL_VERSION == NV_SDL_20
    27 #       define NV_SDL_MIXER_PATH NV_SDL_MIXER_PATH_20
    28 #elif NV_SDL_VERSION == NV_SDL_C
    29 #       define NV_SDL_MIXER_PATH nullptr
    30 #else
    31 #       error "Unrecognized NV_SDL_VERSION!"
     18#       define NV_SDL_MIXER_PATH "libSDL2_mixer-2.0.so.0"
    3219#endif
    3320
    3421extern "C" {
    3522
    36 #if NV_SDL_VERSION == NV_SDL_20
    3723#define SDL_MIXER_MAJOR_VERSION 2
    3824#define SDL_MIXER_MINOR_VERSION 0
    3925#define SDL_MIXER_PATCHLEVEL    0
    40 #else
    41 #define SDL_MIXER_MAJOR_VERSION 1
    42 #define SDL_MIXER_MINOR_VERSION 2
    43 #define SDL_MIXER_PATCHLEVEL    12
    44 #endif
    4526
    4627#define SDL_MIXER_VERSION(X)                        \
Note: See TracChangeset for help on using the changeset viewer.