yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::platform Namespace Reference

Classes

class  IWindowBackend
 Abstract window backend interface. More...
 
struct  PatchInfo
 
class  SDL2WindowBackend
 SDL2 implementation of the window backend interface. More...
 
class  WasmPatchExport
 
class  WindowBackendFactory
 Factory for creating window backends. More...
 
struct  WindowConfig
 Window configuration parameters. More...
 
struct  WindowEvent
 Platform-agnostic window event data. More...
 
struct  WindowStatus
 Window backend status information. More...
 

Typedefs

using KeyboardState = const Uint8*
 
using GamepadHandle = SDL_GameController*
 
using GamepadButton = SDL_GameControllerButton
 
using GamepadAxis = SDL_GameControllerAxis
 

Enumerations

enum class  WindowEventType {
  None , Close , Resize , Minimized ,
  Maximized , Restored , Shown , Hidden ,
  Exposed , FocusGained , FocusLost , KeyDown ,
  KeyUp , MouseMotion , MouseButtonDown , MouseButtonUp ,
  MouseWheel , Quit , DropFile
}
 Window event types (platform-agnostic) More...
 
enum class  WindowBackendType { SDL2 , SDL3 , Auto }
 Backend type enumeration for factory. More...
 

Functions

SDL_Keycode GetKeyFromEvent (const SDL_Event &event)
 Get keyboard state from SDL event.
 
SDL_Scancode GetScancodeFromKey (SDL_Keycode key)
 Get scancode from keycode.
 
bool IsKeyPressed (KeyboardState state, SDL_Scancode scancode)
 Check if a key is pressed using the keyboard state.
 
GamepadHandle OpenGamepad (int index)
 
void CloseGamepad (GamepadHandle gamepad)
 
bool GetGamepadButton (GamepadHandle gamepad, SDL_GameControllerButton button)
 
int16_t GetGamepadAxis (GamepadHandle gamepad, SDL_GameControllerAxis axis)
 
bool IsGamepadConnected (int index)
 
SDL_Renderer * CreateRenderer (SDL_Window *window)
 Create a renderer with default settings.
 
void SetRenderVSync (SDL_Renderer *renderer, int interval)
 Set vertical sync for the renderer.
 
bool RenderTexture (SDL_Renderer *renderer, SDL_Texture *texture, const SDL_Rect *srcrect, const SDL_Rect *dstrect)
 Render a texture to the current render target.
 
void FreeSurface (SDL_Surface *surface)
 Free/destroy a surface.
 
SDL_Surface * ConvertSurfaceFormat (SDL_Surface *surface, uint32_t format, uint32_t flags=0)
 Convert a surface to a specific pixel format.
 
SDL_Palette * GetSurfacePalette (SDL_Surface *surface)
 Get the palette attached to a surface.
 
Uint32 GetSurfaceFormat (SDL_Surface *surface)
 Get the pixel format of a surface as Uint32.
 
Uint32 MapRGB (SDL_Surface *surface, Uint8 r, Uint8 g, Uint8 b)
 Map an RGB color to the surface's pixel format.
 
SDL_Surface * CreateSurface (int width, int height, int depth, uint32_t format)
 Create a surface using the appropriate API.
 
int GetSurfaceBitsPerPixel (SDL_Surface *surface)
 Get bits per pixel from a surface.
 
bool EnsureSurfacePalette256 (SDL_Surface *surface)
 Ensure the surface has a proper 256-color palette for indexed formats.
 
int GetSurfaceBytesPerPixel (SDL_Surface *surface)
 Get bytes per pixel from a surface.
 
bool IsWindowCloseEvent (const SDL_Event &event)
 Check if an event is a window close event Works correctly for both SDL2 (nested) and SDL3 (individual) events.
 
bool IsWindowResizeEvent (const SDL_Event &event)
 Check if an event is a window resize event.
 
bool IsWindowMinimizedEvent (const SDL_Event &event)
 Check if an event is a window minimize event.
 
bool IsWindowRestoredEvent (const SDL_Event &event)
 Check if an event is a window restore event.
 
int GetWindowEventWidth (const SDL_Event &event)
 Get window width from resize event data.
 
int GetWindowEventHeight (const SDL_Event &event)
 Get window height from resize event data.
 
bool InitSucceeded (int result)
 Check if SDL initialization succeeded.
 
uint32_t GetDefaultInitFlags ()
 Get recommended init flags.
 
SDL_Surface * CreateRGBSurface (Uint32 flags, int width, int height, int depth, Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask)
 Create an RGB surface.
 
void DestroySurface (SDL_Surface *surface)
 Destroy a surface.
 
int GetRendererOutputSize (SDL_Renderer *renderer, int *w, int *h)
 Get renderer output size.
 
SDL_Surface * ReadPixelsToSurface (SDL_Renderer *renderer, int width, int height, const SDL_Rect *rect)
 Read pixels from renderer to a surface.
 
SDL_Surface * LoadBMP (const char *file)
 Load a BMP file.
 

Variables

constexpr auto kEventKeyDown = SDL_KEYDOWN
 
constexpr auto kEventKeyUp = SDL_KEYUP
 
constexpr auto kEventMouseMotion = SDL_MOUSEMOTION
 
constexpr auto kEventMouseButtonDown = SDL_MOUSEBUTTONDOWN
 
constexpr auto kEventMouseButtonUp = SDL_MOUSEBUTTONUP
 
constexpr auto kEventMouseWheel = SDL_MOUSEWHEEL
 
constexpr auto kEventQuit = SDL_QUIT
 
constexpr auto kEventDropFile = SDL_DROPFILE
 
constexpr auto kEventWindowEvent = SDL_WINDOWEVENT
 
constexpr auto kEventControllerDeviceAdded = SDL_CONTROLLERDEVICEADDED
 
constexpr auto kEventControllerDeviceRemoved = SDL_CONTROLLERDEVICEREMOVED
 
constexpr auto kKeyA = SDLK_a
 
constexpr auto kKeyB = SDLK_b
 
constexpr auto kKeyC = SDLK_c
 
constexpr auto kKeyD = SDLK_d
 
constexpr auto kKeyS = SDLK_s
 
constexpr auto kKeyX = SDLK_x
 
constexpr auto kKeyY = SDLK_y
 
constexpr auto kKeyZ = SDLK_z
 
constexpr auto kKeyReturn = SDLK_RETURN
 
constexpr auto kKeyRShift = SDLK_RSHIFT
 
constexpr auto kKeyUp = SDLK_UP
 
constexpr auto kKeyDown = SDLK_DOWN
 
constexpr auto kKeyLeft = SDLK_LEFT
 
constexpr auto kKeyRight = SDLK_RIGHT
 
constexpr auto kGamepadButtonA = SDL_CONTROLLER_BUTTON_A
 
constexpr auto kGamepadButtonB = SDL_CONTROLLER_BUTTON_B
 
constexpr auto kGamepadButtonX = SDL_CONTROLLER_BUTTON_X
 
constexpr auto kGamepadButtonY = SDL_CONTROLLER_BUTTON_Y
 
constexpr auto kGamepadButtonBack = SDL_CONTROLLER_BUTTON_BACK
 
constexpr auto kGamepadButtonStart = SDL_CONTROLLER_BUTTON_START
 
constexpr auto kGamepadButtonLeftShoulder = SDL_CONTROLLER_BUTTON_LEFTSHOULDER
 
constexpr auto kGamepadButtonRightShoulder = SDL_CONTROLLER_BUTTON_RIGHTSHOULDER
 
constexpr auto kGamepadButtonDpadUp = SDL_CONTROLLER_BUTTON_DPAD_UP
 
constexpr auto kGamepadButtonDpadDown = SDL_CONTROLLER_BUTTON_DPAD_DOWN
 
constexpr auto kGamepadButtonDpadLeft = SDL_CONTROLLER_BUTTON_DPAD_LEFT
 
constexpr auto kGamepadButtonDpadRight = SDL_CONTROLLER_BUTTON_DPAD_RIGHT
 
constexpr auto kGamepadAxisLeftX = SDL_CONTROLLER_AXIS_LEFTX
 
constexpr auto kGamepadAxisLeftY = SDL_CONTROLLER_AXIS_LEFTY
 

Typedef Documentation

◆ KeyboardState

using yaze::platform::KeyboardState = const Uint8*

Definition at line 32 of file sdl_compat.h.

◆ GamepadHandle

using yaze::platform::GamepadHandle = SDL_GameController*

Definition at line 193 of file sdl_compat.h.

◆ GamepadButton

using yaze::platform::GamepadButton = SDL_GameControllerButton

Definition at line 245 of file sdl_compat.h.

◆ GamepadAxis

using yaze::platform::GamepadAxis = SDL_GameControllerAxis

Definition at line 246 of file sdl_compat.h.

Enumeration Type Documentation

◆ WindowEventType

Window event types (platform-agnostic)

Enumerator
None 
Close 
Resize 
Minimized 
Maximized 
Restored 
Shown 
Hidden 
Exposed 
FocusGained 
FocusLost 
KeyDown 
KeyUp 
MouseMotion 
MouseButtonDown 
MouseButtonUp 
MouseWheel 
Quit 
DropFile 

Definition at line 38 of file iwindow.h.

◆ WindowBackendType

Backend type enumeration for factory.

Enumerator
SDL2 
SDL3 
Auto 

Definition at line 272 of file iwindow.h.

Function Documentation

◆ GetKeyFromEvent()

SDL_Keycode yaze::platform::GetKeyFromEvent ( const SDL_Event & event)
inline

Get keyboard state from SDL event.

Parameters
eventThe SDL event
Returns
The keycode from the event

Definition at line 115 of file sdl_compat.h.

Referenced by yaze::emu::input::SDL2InputBackend::ProcessEvent(), yaze::emu::input::SDL3InputBackend::ProcessEvent(), and yaze::emu::ui::RenderKeyboardConfig().

◆ GetScancodeFromKey()

SDL_Scancode yaze::platform::GetScancodeFromKey ( SDL_Keycode key)
inline

Get scancode from keycode.

Parameters
keyThe keycode
Returns
The corresponding scancode

Definition at line 128 of file sdl_compat.h.

Referenced by yaze::emu::input::SDL2InputBackend::Poll().

◆ IsKeyPressed()

bool yaze::platform::IsKeyPressed ( KeyboardState state,
SDL_Scancode scancode )
inline

Check if a key is pressed using the keyboard state.

Parameters
stateThe keyboard state from SDL_GetKeyboardState
scancodeThe scancode to check
Returns
True if the key is pressed

Definition at line 142 of file sdl_compat.h.

Referenced by yaze::emu::input::SDL3InputBackend::Poll(), and yaze::emu::ui::RenderEmulatorInterface().

◆ OpenGamepad()

◆ CloseGamepad()

◆ GetGamepadButton()

bool yaze::platform::GetGamepadButton ( GamepadHandle gamepad,
SDL_GameControllerButton button )
inline

Definition at line 206 of file sdl_compat.h.

Referenced by yaze::emu::input::SDL3InputBackend::PollGamepad().

◆ GetGamepadAxis()

int16_t yaze::platform::GetGamepadAxis ( GamepadHandle gamepad,
SDL_GameControllerAxis axis )
inline

Definition at line 211 of file sdl_compat.h.

Referenced by yaze::emu::input::SDL3InputBackend::PollGamepad().

◆ IsGamepadConnected()

bool yaze::platform::IsGamepadConnected ( int index)
inline

Definition at line 216 of file sdl_compat.h.

◆ CreateRenderer()

SDL_Renderer * yaze::platform::CreateRenderer ( SDL_Window * window)
inline

Create a renderer with default settings.

SDL2: SDL_CreateRenderer(window, -1, SDL_RENDERER_ACCELERATED) SDL3: SDL_CreateRenderer(window, nullptr)

Definition at line 275 of file sdl_compat.h.

Referenced by yaze::gfx::SDL2Renderer::Initialize().

◆ SetRenderVSync()

void yaze::platform::SetRenderVSync ( SDL_Renderer * renderer,
int interval )
inline

Set vertical sync for the renderer.

SDL2: VSync is set at renderer creation time via flags SDL3: SDL_SetRenderVSync(renderer, interval)

Definition at line 289 of file sdl_compat.h.

Referenced by yaze::gfx::SDL2Renderer::Initialize().

◆ RenderTexture()

bool yaze::platform::RenderTexture ( SDL_Renderer * renderer,
SDL_Texture * texture,
const SDL_Rect * srcrect,
const SDL_Rect * dstrect )
inline

Render a texture to the current render target.

SDL2: SDL_RenderCopy(renderer, texture, srcrect, dstrect) SDL3: SDL_RenderTexture(renderer, texture, srcrect, dstrect)

Note: This version handles the int to float conversion for SDL3.

Definition at line 307 of file sdl_compat.h.

Referenced by yaze::gfx::SDL2Renderer::RenderCopy().

◆ FreeSurface()

void yaze::platform::FreeSurface ( SDL_Surface * surface)
inline

Free/destroy a surface.

SDL2: SDL_FreeSurface(surface) SDL3: SDL_DestroySurface(surface)

Definition at line 346 of file sdl_compat.h.

◆ ConvertSurfaceFormat()

SDL_Surface * yaze::platform::ConvertSurfaceFormat ( SDL_Surface * surface,
uint32_t format,
uint32_t flags = 0 )
inline

Convert a surface to a specific pixel format.

SDL2: SDL_ConvertSurfaceFormat(surface, format, flags) SDL3: SDL_ConvertSurface(surface, format)

Definition at line 361 of file sdl_compat.h.

Referenced by yaze::gfx::SDL2Renderer::UpdateTexture().

◆ GetSurfacePalette()

◆ GetSurfaceFormat()

Uint32 yaze::platform::GetSurfaceFormat ( SDL_Surface * surface)
inline

Get the pixel format of a surface as Uint32.

Note: SDL2 uses Uint32 for pixel format, SDL3 uses SDL_PixelFormat enum. This function returns Uint32 for cross-version compatibility.

Definition at line 390 of file sdl_compat.h.

Referenced by yaze::zelda3::PaletteDebugger::LogSurfaceState().

◆ MapRGB()

Uint32 yaze::platform::MapRGB ( SDL_Surface * surface,
Uint8 r,
Uint8 g,
Uint8 b )
inline

Map an RGB color to the surface's pixel format.

Definition at line 402 of file sdl_compat.h.

Referenced by yaze::gfx::Bitmap::WriteColor().

◆ CreateSurface()

SDL_Surface * yaze::platform::CreateSurface ( int width,
int height,
int depth,
uint32_t format )
inline

Create a surface using the appropriate API.

Definition at line 418 of file sdl_compat.h.

Referenced by yaze::gfx::Arena::AllocateSurface().

◆ GetSurfaceBitsPerPixel()

int yaze::platform::GetSurfaceBitsPerPixel ( SDL_Surface * surface)
inline

Get bits per pixel from a surface.

SDL2: surface->format->BitsPerPixel SDL3: SDL_GetPixelFormatDetails(surface->format)->bits_per_pixel

Definition at line 434 of file sdl_compat.h.

Referenced by EnsureSurfacePalette256(), and yaze::gui::CanvasContextMenu::RenderBitmapOperationsMenu().

◆ EnsureSurfacePalette256()

bool yaze::platform::EnsureSurfacePalette256 ( SDL_Surface * surface)
inline

Ensure the surface has a proper 256-color palette for indexed formats.

For 8-bit indexed surfaces, this creates and attaches a 256-color palette if one doesn't exist or if the existing palette is too small.

Parameters
surfaceThe surface to check/fix
Returns
true if surface now has a valid 256-color palette, false on error

Definition at line 454 of file sdl_compat.h.

References GetSurfaceBitsPerPixel(), and GetSurfacePalette().

Referenced by yaze::gfx::Bitmap::Create(), and yaze::gfx::Bitmap::SetPalette().

Here is the call graph for this function:

◆ GetSurfaceBytesPerPixel()

int yaze::platform::GetSurfaceBytesPerPixel ( SDL_Surface * surface)
inline

Get bytes per pixel from a surface.

SDL2: surface->format->BytesPerPixel SDL3: SDL_GetPixelFormatDetails(surface->format)->bytes_per_pixel

Definition at line 507 of file sdl_compat.h.

Referenced by yaze::gui::CanvasContextMenu::RenderBitmapOperationsMenu().

◆ IsWindowCloseEvent()

bool yaze::platform::IsWindowCloseEvent ( const SDL_Event & event)
inline

Check if an event is a window close event Works correctly for both SDL2 (nested) and SDL3 (individual) events.

Definition at line 577 of file sdl_compat.h.

◆ IsWindowResizeEvent()

bool yaze::platform::IsWindowResizeEvent ( const SDL_Event & event)
inline

Check if an event is a window resize event.

Definition at line 589 of file sdl_compat.h.

◆ IsWindowMinimizedEvent()

bool yaze::platform::IsWindowMinimizedEvent ( const SDL_Event & event)
inline

Check if an event is a window minimize event.

Definition at line 603 of file sdl_compat.h.

◆ IsWindowRestoredEvent()

bool yaze::platform::IsWindowRestoredEvent ( const SDL_Event & event)
inline

Check if an event is a window restore event.

Definition at line 615 of file sdl_compat.h.

◆ GetWindowEventWidth()

int yaze::platform::GetWindowEventWidth ( const SDL_Event & event)
inline

Get window width from resize event data.

Definition at line 627 of file sdl_compat.h.

◆ GetWindowEventHeight()

int yaze::platform::GetWindowEventHeight ( const SDL_Event & event)
inline

Get window height from resize event data.

Definition at line 634 of file sdl_compat.h.

◆ InitSucceeded()

bool yaze::platform::InitSucceeded ( int result)
inline

Check if SDL initialization succeeded.

SDL2: Returns 0 on success SDL3: Returns true (non-zero) on success

Definition at line 648 of file sdl_compat.h.

◆ GetDefaultInitFlags()

uint32_t yaze::platform::GetDefaultInitFlags ( )
inline

Get recommended init flags.

SDL3 removed SDL_INIT_TIMER (timer is always available).

Definition at line 663 of file sdl_compat.h.

◆ CreateRGBSurface()

SDL_Surface * yaze::platform::CreateRGBSurface ( Uint32 flags,
int width,
int height,
int depth,
Uint32 Rmask,
Uint32 Gmask,
Uint32 Bmask,
Uint32 Amask )
inline

Create an RGB surface.

Definition at line 678 of file sdl_compat.h.

◆ DestroySurface()

void yaze::platform::DestroySurface ( SDL_Surface * surface)
inline

Destroy a surface.

Definition at line 694 of file sdl_compat.h.

◆ GetRendererOutputSize()

int yaze::platform::GetRendererOutputSize ( SDL_Renderer * renderer,
int * w,
int * h )
inline

Get renderer output size.

Definition at line 709 of file sdl_compat.h.

◆ ReadPixelsToSurface()

SDL_Surface * yaze::platform::ReadPixelsToSurface ( SDL_Renderer * renderer,
int width,
int height,
const SDL_Rect * rect )
inline

Read pixels from renderer to a surface.

SDL3: Returns a new surface SDL2: We manually create surface and read into it to match SDL3 behavior

Definition at line 723 of file sdl_compat.h.

◆ LoadBMP()

SDL_Surface * yaze::platform::LoadBMP ( const char * file)
inline

Load a BMP file.

Definition at line 747 of file sdl_compat.h.

Variable Documentation

◆ kEventKeyDown

constexpr auto yaze::platform::kEventKeyDown = SDL_KEYDOWN
constexpr

◆ kEventKeyUp

constexpr auto yaze::platform::kEventKeyUp = SDL_KEYUP
constexpr

◆ kEventMouseMotion

constexpr auto yaze::platform::kEventMouseMotion = SDL_MOUSEMOTION
constexpr

Definition at line 55 of file sdl_compat.h.

◆ kEventMouseButtonDown

constexpr auto yaze::platform::kEventMouseButtonDown = SDL_MOUSEBUTTONDOWN
constexpr

Definition at line 56 of file sdl_compat.h.

◆ kEventMouseButtonUp

constexpr auto yaze::platform::kEventMouseButtonUp = SDL_MOUSEBUTTONUP
constexpr

Definition at line 57 of file sdl_compat.h.

◆ kEventMouseWheel

constexpr auto yaze::platform::kEventMouseWheel = SDL_MOUSEWHEEL
constexpr

Definition at line 58 of file sdl_compat.h.

◆ kEventQuit

constexpr auto yaze::platform::kEventQuit = SDL_QUIT
constexpr

Definition at line 59 of file sdl_compat.h.

◆ kEventDropFile

constexpr auto yaze::platform::kEventDropFile = SDL_DROPFILE
constexpr

Definition at line 60 of file sdl_compat.h.

◆ kEventWindowEvent

constexpr auto yaze::platform::kEventWindowEvent = SDL_WINDOWEVENT
constexpr

Definition at line 63 of file sdl_compat.h.

◆ kEventControllerDeviceAdded

constexpr auto yaze::platform::kEventControllerDeviceAdded = SDL_CONTROLLERDEVICEADDED
constexpr

Definition at line 64 of file sdl_compat.h.

◆ kEventControllerDeviceRemoved

constexpr auto yaze::platform::kEventControllerDeviceRemoved = SDL_CONTROLLERDEVICEREMOVED
constexpr

Definition at line 65 of file sdl_compat.h.

◆ kKeyA

constexpr auto yaze::platform::kKeyA = SDLK_a
constexpr

Definition at line 90 of file sdl_compat.h.

Referenced by yaze::emu::input::ApplyDefaultKeyBindings().

◆ kKeyB

constexpr auto yaze::platform::kKeyB = SDLK_b
constexpr

Definition at line 91 of file sdl_compat.h.

◆ kKeyC

constexpr auto yaze::platform::kKeyC = SDLK_c
constexpr

Definition at line 92 of file sdl_compat.h.

Referenced by yaze::emu::input::ApplyDefaultKeyBindings().

◆ kKeyD

constexpr auto yaze::platform::kKeyD = SDLK_d
constexpr

Definition at line 93 of file sdl_compat.h.

Referenced by yaze::emu::input::ApplyDefaultKeyBindings().

◆ kKeyS

constexpr auto yaze::platform::kKeyS = SDLK_s
constexpr

Definition at line 94 of file sdl_compat.h.

Referenced by yaze::emu::input::ApplyDefaultKeyBindings().

◆ kKeyX

constexpr auto yaze::platform::kKeyX = SDLK_x
constexpr

Definition at line 95 of file sdl_compat.h.

Referenced by yaze::emu::input::ApplyDefaultKeyBindings().

◆ kKeyY

constexpr auto yaze::platform::kKeyY = SDLK_y
constexpr

Definition at line 96 of file sdl_compat.h.

◆ kKeyZ

constexpr auto yaze::platform::kKeyZ = SDLK_z
constexpr

Definition at line 97 of file sdl_compat.h.

Referenced by yaze::emu::input::ApplyDefaultKeyBindings().

◆ kKeyReturn

constexpr auto yaze::platform::kKeyReturn = SDLK_RETURN
constexpr

Definition at line 98 of file sdl_compat.h.

Referenced by yaze::emu::input::ApplyDefaultKeyBindings().

◆ kKeyRShift

constexpr auto yaze::platform::kKeyRShift = SDLK_RSHIFT
constexpr

Definition at line 99 of file sdl_compat.h.

Referenced by yaze::emu::input::ApplyDefaultKeyBindings().

◆ kKeyUp

constexpr auto yaze::platform::kKeyUp = SDLK_UP
constexpr

Definition at line 100 of file sdl_compat.h.

Referenced by yaze::emu::input::ApplyDefaultKeyBindings().

◆ kKeyDown

constexpr auto yaze::platform::kKeyDown = SDLK_DOWN
constexpr

Definition at line 101 of file sdl_compat.h.

Referenced by yaze::emu::input::ApplyDefaultKeyBindings().

◆ kKeyLeft

constexpr auto yaze::platform::kKeyLeft = SDLK_LEFT
constexpr

Definition at line 102 of file sdl_compat.h.

Referenced by yaze::emu::input::ApplyDefaultKeyBindings().

◆ kKeyRight

constexpr auto yaze::platform::kKeyRight = SDLK_RIGHT
constexpr

Definition at line 103 of file sdl_compat.h.

Referenced by yaze::emu::input::ApplyDefaultKeyBindings().

◆ kGamepadButtonA

constexpr auto yaze::platform::kGamepadButtonA = SDL_CONTROLLER_BUTTON_A
constexpr

Definition at line 248 of file sdl_compat.h.

Referenced by yaze::emu::input::SDL3InputBackend::PollGamepad().

◆ kGamepadButtonB

constexpr auto yaze::platform::kGamepadButtonB = SDL_CONTROLLER_BUTTON_B
constexpr

Definition at line 249 of file sdl_compat.h.

Referenced by yaze::emu::input::SDL3InputBackend::PollGamepad().

◆ kGamepadButtonX

constexpr auto yaze::platform::kGamepadButtonX = SDL_CONTROLLER_BUTTON_X
constexpr

Definition at line 250 of file sdl_compat.h.

Referenced by yaze::emu::input::SDL3InputBackend::PollGamepad().

◆ kGamepadButtonY

constexpr auto yaze::platform::kGamepadButtonY = SDL_CONTROLLER_BUTTON_Y
constexpr

Definition at line 251 of file sdl_compat.h.

Referenced by yaze::emu::input::SDL3InputBackend::PollGamepad().

◆ kGamepadButtonBack

constexpr auto yaze::platform::kGamepadButtonBack = SDL_CONTROLLER_BUTTON_BACK
constexpr

Definition at line 252 of file sdl_compat.h.

Referenced by yaze::emu::input::SDL3InputBackend::PollGamepad().

◆ kGamepadButtonStart

constexpr auto yaze::platform::kGamepadButtonStart = SDL_CONTROLLER_BUTTON_START
constexpr

Definition at line 253 of file sdl_compat.h.

Referenced by yaze::emu::input::SDL3InputBackend::PollGamepad().

◆ kGamepadButtonLeftShoulder

constexpr auto yaze::platform::kGamepadButtonLeftShoulder = SDL_CONTROLLER_BUTTON_LEFTSHOULDER
constexpr

Definition at line 254 of file sdl_compat.h.

Referenced by yaze::emu::input::SDL3InputBackend::PollGamepad().

◆ kGamepadButtonRightShoulder

constexpr auto yaze::platform::kGamepadButtonRightShoulder = SDL_CONTROLLER_BUTTON_RIGHTSHOULDER
constexpr

Definition at line 255 of file sdl_compat.h.

Referenced by yaze::emu::input::SDL3InputBackend::PollGamepad().

◆ kGamepadButtonDpadUp

constexpr auto yaze::platform::kGamepadButtonDpadUp = SDL_CONTROLLER_BUTTON_DPAD_UP
constexpr

Definition at line 256 of file sdl_compat.h.

Referenced by yaze::emu::input::SDL3InputBackend::PollGamepad().

◆ kGamepadButtonDpadDown

constexpr auto yaze::platform::kGamepadButtonDpadDown = SDL_CONTROLLER_BUTTON_DPAD_DOWN
constexpr

Definition at line 257 of file sdl_compat.h.

Referenced by yaze::emu::input::SDL3InputBackend::PollGamepad().

◆ kGamepadButtonDpadLeft

constexpr auto yaze::platform::kGamepadButtonDpadLeft = SDL_CONTROLLER_BUTTON_DPAD_LEFT
constexpr

Definition at line 258 of file sdl_compat.h.

Referenced by yaze::emu::input::SDL3InputBackend::PollGamepad().

◆ kGamepadButtonDpadRight

constexpr auto yaze::platform::kGamepadButtonDpadRight = SDL_CONTROLLER_BUTTON_DPAD_RIGHT
constexpr

Definition at line 259 of file sdl_compat.h.

Referenced by yaze::emu::input::SDL3InputBackend::PollGamepad().

◆ kGamepadAxisLeftX

constexpr auto yaze::platform::kGamepadAxisLeftX = SDL_CONTROLLER_AXIS_LEFTX
constexpr

Definition at line 261 of file sdl_compat.h.

Referenced by yaze::emu::input::SDL3InputBackend::PollGamepad().

◆ kGamepadAxisLeftY

constexpr auto yaze::platform::kGamepadAxisLeftY = SDL_CONTROLLER_AXIS_LEFTY
constexpr

Definition at line 262 of file sdl_compat.h.

Referenced by yaze::emu::input::SDL3InputBackend::PollGamepad().