Minor format tweaks

This commit is contained in:
Ray 2025-11-23 13:21:31 +01:00
parent 84737a9fc1
commit f1719480e0
5 changed files with 13 additions and 13 deletions

View File

@ -1188,7 +1188,7 @@ Image GetClipboardImage(void)
size_t dataSize = 0; size_t dataSize = 0;
void *fileData = NULL; void *fileData = NULL;
for (int i = 0; i < SDL_arraysize(imageFormats); ++i) for (int i = 0; i < SDL_arraysize(imageFormats); i++)
{ {
// NOTE: This pointer should be free with SDL_free() at some point // NOTE: This pointer should be free with SDL_free() at some point
fileData = SDL_GetClipboardData(imageFormats[i], &dataSize); fileData = SDL_GetClipboardData(imageFormats[i], &dataSize);
@ -1395,7 +1395,7 @@ void PollInputEvents(void)
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// WARNING: Indexes into this array are obtained by using SDL_Scancode values, not SDL_Keycode values // WARNING: Indexes into this array are obtained by using SDL_Scancode values, not SDL_Keycode values
//const Uint8 *keys = SDL_GetKeyboardState(NULL); //const Uint8 *keys = SDL_GetKeyboardState(NULL);
//for (int i = 0; i < 256; ++i) CORE.Input.Keyboard.currentKeyState[i] = keys[i]; //for (int i = 0; i < 256; i++) CORE.Input.Keyboard.currentKeyState[i] = keys[i];
CORE.Window.resizedLastFrame = false; CORE.Window.resizedLastFrame = false;
@ -1562,7 +1562,7 @@ void PollInputEvents(void)
case SDL_KEYDOWN: case SDL_KEYDOWN:
{ {
#if defined(USING_VERSION_SDL3) #if defined(USING_VERSION_SDL3)
// SDL3 Migration: The following structures have been removed: * SDL_Keysym // SDL3 Migration: The following structures have been removed: SDL_Keysym
KeyboardKey key = ConvertScancodeToKey(event.key.scancode); KeyboardKey key = ConvertScancodeToKey(event.key.scancode);
#else #else
KeyboardKey key = ConvertScancodeToKey(event.key.keysym.scancode); KeyboardKey key = ConvertScancodeToKey(event.key.keysym.scancode);
@ -1697,7 +1697,7 @@ void PollInputEvents(void)
int jid = event.jdevice.which; // Joystick device index int jid = event.jdevice.which; // Joystick device index
// check if already added at InitPlatform // check if already added at InitPlatform
for (int i = 0; i < MAX_GAMEPADS; ++i) for (int i = 0; i < MAX_GAMEPADS; i++)
{ {
if (jid == platform.gamepadId[i]) if (jid == platform.gamepadId[i])
{ {

View File

@ -1456,7 +1456,7 @@ int InitPlatform(void)
// find the EGL config that matches the previously setup GBM format // find the EGL config that matches the previously setup GBM format
int found = 0; int found = 0;
for (EGLint i = 0; i < matchingNumConfigs; ++i) for (EGLint i = 0; i < matchingNumConfigs; i++)
{ {
EGLint id = 0; EGLint id = 0;
if (!eglGetConfigAttrib(platform.device, configs[i], EGL_NATIVE_VISUAL_ID, &id)) if (!eglGetConfigAttrib(platform.device, configs[i], EGL_NATIVE_VISUAL_ID, &id))
@ -1878,7 +1878,7 @@ static void InitEvdevInput(void)
platform.mouseFd = -1; platform.mouseFd = -1;
// Reset variables // Reset variables
for (int i = 0; i < MAX_TOUCH_POINTS; ++i) for (int i = 0; i < MAX_TOUCH_POINTS; i++)
{ {
CORE.Input.Touch.position[i].x = -1; CORE.Input.Touch.position[i].x = -1;
CORE.Input.Touch.position[i].y = -1; CORE.Input.Touch.position[i].y = -1;

View File

@ -1671,8 +1671,8 @@ static EM_BOOL EmscriptenGamepadCallback(int eventType, const EmscriptenGamepadE
eventType != 0? emscripten_event_type_to_string(eventType) : "Gamepad state", eventType != 0? emscripten_event_type_to_string(eventType) : "Gamepad state",
gamepadEvent->timestamp, gamepadEvent->connected, gamepadEvent->index, gamepadEvent->numAxes, gamepadEvent->numButtons, gamepadEvent->id, gamepadEvent->mapping); gamepadEvent->timestamp, gamepadEvent->connected, gamepadEvent->index, gamepadEvent->numAxes, gamepadEvent->numButtons, gamepadEvent->id, gamepadEvent->mapping);
for (int i = 0; i < gamepadEvent->numAxes; ++i) TRACELOGD("Axis %d: %g", i, gamepadEvent->axis[i]); for (int i = 0; i < gamepadEvent->numAxes; i++) TRACELOGD("Axis %d: %g", i, gamepadEvent->axis[i]);
for (int i = 0; i < gamepadEvent->numButtons; ++i) TRACELOGD("Button %d: Digital: %d, Analog: %g", i, gamepadEvent->digitalButton[i], gamepadEvent->analogButton[i]); for (int i = 0; i < gamepadEvent->numButtons; i++) TRACELOGD("Button %d: Digital: %d, Analog: %g", i, gamepadEvent->digitalButton[i], gamepadEvent->analogButton[i]);
*/ */
if (gamepadEvent->connected && (gamepadEvent->index < MAX_GAMEPADS)) if (gamepadEvent->connected && (gamepadEvent->index < MAX_GAMEPADS))

View File

@ -3289,7 +3289,7 @@ Mesh GenMeshCubicmap(Image cubicmap, Vector3 cubeSize)
for (int z = 0; z < cubicmap.height; ++z) for (int z = 0; z < cubicmap.height; ++z)
{ {
for (int x = 0; x < cubicmap.width; ++x) for (int x = 0; x < cubicmap.width; x++)
{ {
// Define the 8 vertex of the cube, we will combine them accordingly later... // Define the 8 vertex of the cube, we will combine them accordingly later...
Vector3 v1 = { w*(x - 0.5f), h2, h*(z - 0.5f) }; Vector3 v1 = { w*(x - 0.5f), h2, h*(z - 0.5f) };