mirror of
https://github.com/isledecomp/isle-portable.git
synced 2026-01-17 04:41:16 +00:00
bool conversion
forgot these
This commit is contained in:
parent
6ac4693c0b
commit
ab5fac59b4
8
3rdparty/sdl3-shim/SDL3/SDL.h
vendored
8
3rdparty/sdl3-shim/SDL3/SDL.h
vendored
@ -94,7 +94,7 @@ inline SDL_DisplayMode* SDL_GetCurrentDisplayMode(SDL_DisplayID displayID)
|
|||||||
// hardcode -1 as all uses are NULL or -1 (hacks out failure)
|
// hardcode -1 as all uses are NULL or -1 (hacks out failure)
|
||||||
#define SDL_CreateRenderer(window, name) SDL_CreateRenderer(window, -1, 0)
|
#define SDL_CreateRenderer(window, name) SDL_CreateRenderer(window, -1, 0)
|
||||||
|
|
||||||
#define SDL_RenderTexture SDL_RenderCopyF
|
#define SDL_RenderTexture(...) (SDL_RenderCopyF(__VA_ARGS__) == 0)
|
||||||
|
|
||||||
// https://wiki.libsdl.org/SDL3/README-migration#sdl_haptich
|
// https://wiki.libsdl.org/SDL3/README-migration#sdl_haptich
|
||||||
// SDL_MouseID/SDL_KeyboardID are new
|
// SDL_MouseID/SDL_KeyboardID are new
|
||||||
@ -109,8 +109,8 @@ typedef int SDL_HapticID;
|
|||||||
#define SDL_OpenHaptic SDL_HapticOpen
|
#define SDL_OpenHaptic SDL_HapticOpen
|
||||||
#define SDL_OpenHapticFromJoystick SDL_HapticOpenFromJoystick
|
#define SDL_OpenHapticFromJoystick SDL_HapticOpenFromJoystick
|
||||||
#define SDL_OpenHapticFromMouse SDL_HapticOpenFromMouse
|
#define SDL_OpenHapticFromMouse SDL_HapticOpenFromMouse
|
||||||
#define SDL_InitHapticRumble SDL_HapticRumbleInit
|
#define SDL_InitHapticRumble(...) (SDL_HapticRumbleInit(__VA_ARGS__) == 0)
|
||||||
#define SDL_PlayHapticRumble SDL_HapticRumblePlay
|
#define SDL_PlayHapticRumble(...) (SDL_HapticRumblePlay(__VA_ARGS__) == 0)
|
||||||
|
|
||||||
#define SDL_GetHapticID SDL_HapticIndex
|
#define SDL_GetHapticID SDL_HapticIndex
|
||||||
|
|
||||||
@ -143,7 +143,7 @@ inline SDL_HapticID* SDL_GetHaptics(int *count)
|
|||||||
// https://wiki.libsdl.org/SDL3/README-migration#sdl_videoh
|
// https://wiki.libsdl.org/SDL3/README-migration#sdl_videoh
|
||||||
|
|
||||||
#define SDL_GetDisplayForWindow SDL_GetWindowDisplayIndex
|
#define SDL_GetDisplayForWindow SDL_GetWindowDisplayIndex
|
||||||
#define SDL_SetWindowFullscreenMode SDL_SetWindowDisplayMode
|
#define SDL_SetWindowFullscreenMode(...) (SDL_SetWindowDisplayMode(__VA_ARGS__) == 0)
|
||||||
// #define SDL_GetClosestFullscreenDisplayMode SDL_GetClosestDisplayMode
|
// #define SDL_GetClosestFullscreenDisplayMode SDL_GetClosestDisplayMode
|
||||||
inline bool SDL_GetClosestFullscreenDisplayMode(SDL_DisplayID displayID, int w, int h, float refresh_rate, bool include_high_density_modes, SDL_DisplayMode *closest)
|
inline bool SDL_GetClosestFullscreenDisplayMode(SDL_DisplayID displayID, int w, int h, float refresh_rate, bool include_high_density_modes, SDL_DisplayMode *closest)
|
||||||
{
|
{
|
||||||
|
|||||||
2
3rdparty/sdl3-shim/SDL3/SDL_audio.h
vendored
2
3rdparty/sdl3-shim/SDL3/SDL_audio.h
vendored
@ -54,7 +54,7 @@ static void SDLCALL shim_audio_callback(void *userdata, Uint8 *stream, int len)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#define SDL_ResumeAudioDevice(device) SDL_PauseAudioDevice(device, 0)
|
#define SDL_ResumeAudioDevice(device) SDL_PauseAudioDevice(device, 0)
|
||||||
#define SDL_PutAudioStreamData SDL_AudioStreamPut
|
#define SDL_PutAudioStreamData(...) (SDL_AudioStreamPut(__VA_ARGS__) == 0)
|
||||||
|
|
||||||
inline SDL_AudioDeviceID SDL_GetAudioStreamDevice(SDL_AudioStream* stream)
|
inline SDL_AudioDeviceID SDL_GetAudioStreamDevice(SDL_AudioStream* stream)
|
||||||
{
|
{
|
||||||
|
|||||||
4
3rdparty/sdl3-shim/SDL3/SDL_surface.h
vendored
4
3rdparty/sdl3-shim/SDL3/SDL_surface.h
vendored
@ -14,8 +14,6 @@ struct SDL_SurfaceShim : SDL_Surface {
|
|||||||
|
|
||||||
#define SDL_FillSurfaceRect(...) (SDL_FillRect(__VA_ARGS__) == 0)
|
#define SDL_FillSurfaceRect(...) (SDL_FillRect(__VA_ARGS__) == 0)
|
||||||
|
|
||||||
// #define SDL_ConvertSurface(...) SDL_ConvertSurface(__VA_ARGS__, 0)
|
|
||||||
|
|
||||||
#define SDL_DestroySurface SDL_FreeSurface
|
#define SDL_DestroySurface SDL_FreeSurface
|
||||||
|
|
||||||
#define SDL_CreateSurface(width, height, format) (SDL_Surface*)SDL_CreateRGBSurfaceWithFormat(0 , width, height, SDL_BITSPERPIXEL(format) ,format)
|
#define SDL_CreateSurface(width, height, format) (SDL_Surface*)SDL_CreateRGBSurfaceWithFormat(0 , width, height, SDL_BITSPERPIXEL(format) ,format)
|
||||||
@ -30,7 +28,7 @@ inline SDL_Surface* SDL_ConvertSurface(SDL_Surface* surface, SDL_PixelFormat for
|
|||||||
#define SDL_SCALEMODE_NEAREST SDL_ScaleModeNearest
|
#define SDL_SCALEMODE_NEAREST SDL_ScaleModeNearest
|
||||||
|
|
||||||
#define SDL_BlitSurfaceScaled(surface, rect, destSurface, destRect, scaleMode) (SDL_BlitScaled(surface, rect, destSurface, destRect) == 0)
|
#define SDL_BlitSurfaceScaled(surface, rect, destSurface, destRect, scaleMode) (SDL_BlitScaled(surface, rect, destSurface, destRect) == 0)
|
||||||
#define SDL_SetSurfaceColorKey SDL_SetColorKey
|
#define SDL_SetSurfaceColorKey(...) (SDL_SetColorKey(__VA_ARGS__) == 0)
|
||||||
|
|
||||||
#define SDL_LoadBMP_IO (SDL_Surface*)SDL_LoadBMP_RW
|
#define SDL_LoadBMP_IO (SDL_Surface*)SDL_LoadBMP_RW
|
||||||
#define SDL_LoadBMP(file) (SDL_Surface*)SDL_LoadBMP_RW(SDL_RWFromFile(file, "rb"), 1) //yoinked the existing SDL_LoadBMP macro so it could be cast
|
#define SDL_LoadBMP(file) (SDL_Surface*)SDL_LoadBMP_RW(SDL_RWFromFile(file, "rb"), 1) //yoinked the existing SDL_LoadBMP macro so it could be cast
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user