Skip to content

Commit

Permalink
Fix typos in src/platforms/rcore_*.c (#3581)
Browse files Browse the repository at this point in the history
  • Loading branch information
RadsammyT authored Nov 28, 2023
1 parent 1906f1e commit fe53ba8
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions src/platforms/rcore_desktop.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ static void KeyCallback(GLFWwindow *window, int key, int scancode, int action, i
static void CharCallback(GLFWwindow *window, unsigned int key); // GLFW3 Char Key Callback, runs on key pressed (get char value)
static void MouseButtonCallback(GLFWwindow *window, int button, int action, int mods); // GLFW3 Mouse Button Callback, runs on mouse button pressed
static void MouseCursorPosCallback(GLFWwindow *window, double x, double y); // GLFW3 Cursor Position Callback, runs on mouse move
static void MouseScrollCallback(GLFWwindow *window, double xoffset, double yoffset); // GLFW3 Srolling Callback, runs on mouse wheel
static void MouseScrollCallback(GLFWwindow *window, double xoffset, double yoffset); // GLFW3 Scrolling Callback, runs on mouse wheel
static void CursorEnterCallback(GLFWwindow *window, int enter); // GLFW3 Cursor Enter Callback, cursor enters client area
static void JoystickCallback(int jid, int event); // GLFW3 Joystick Connected/Disconnected Callback

Expand Down Expand Up @@ -1137,7 +1137,7 @@ void PollInputEvents(void)
//for (int i = 0; i < MAX_TOUCH_POINTS; i++) CORE.Input.Touch.position[i] = (Vector2){ 0, 0 };

// Map touch position to mouse position for convenience
// WARNING: If the target desktop device supports touch screen, this behavious should be reviewed!
// WARNING: If the target desktop device supports touch screen, this behaviour should be reviewed!
// TODO: GLFW does not support multi-touch input just yet
// https://www.codeproject.com/Articles/668404/Programming-for-Multi-Touch
// https://docs.microsoft.com/en-us/windows/win32/wintouch/getting-started-with-multi-touch-messages
Expand Down
12 changes: 6 additions & 6 deletions src/platforms/rcore_desktop_sdl.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
*
**********************************************************************************************/

#include "SDL.h" // SDL base library (window/rendered, input, timming... functionality)
#include "SDL.h" // SDL base library (window/rendered, input, timing... functionality)

#if defined(GRAPHICS_API_OPENGL_ES2)
// It seems it does not need to be included to work
Expand Down Expand Up @@ -598,7 +598,7 @@ void SetWindowMonitor(int monitor)
// NOTE:
// 1. SDL started supporting moving exclusive fullscreen windows between displays on SDL3,
// see commit https://github.com/libsdl-org/SDL/commit/3f5ef7dd422057edbcf3e736107e34be4b75d9ba
// 2. A workround for SDL2 is leaving fullscreen, moving the window, then entering full screen again.
// 2. A workaround for SDL2 is leaving fullscreen, moving the window, then entering full screen again.
const bool wasFullscreen = ((CORE.Window.flags & FLAG_FULLSCREEN_MODE) > 0) ? true : false;

const int screenWidth = CORE.Window.screen.width;
Expand All @@ -617,7 +617,7 @@ void SetWindowMonitor(int monitor)
// ending up positioned partly outside the target display.
// 2. The workaround for that is, previously to moving the window,
// setting the window size to the target display size, so they match.
// 3. It was't done here because we can't assume changing the window size automatically
// 3. It wasn't done here because we can't assume changing the window size automatically
// is acceptable behavior by the user.
SDL_SetWindowPosition(platform.window, usableBounds.x, usableBounds.y);
CORE.Window.position.x = usableBounds.x;
Expand Down Expand Up @@ -1012,7 +1012,7 @@ void PollInputEvents(void)
// Register previous mouse states
for (int i = 0; i < MAX_MOUSE_BUTTONS; i++) CORE.Input.Mouse.previousButtonState[i] = CORE.Input.Mouse.currentButtonState[i];

// Poll input events for current plaform
// Poll input events for current platform
//-----------------------------------------------------------------------------
/*
// WARNING: Indexes into this array are obtained by using SDL_Scancode values, not SDL_Keycode values
Expand Down Expand Up @@ -1318,7 +1318,7 @@ int InitPlatform(void)
// Init OpenGL context
platform.glContext = SDL_GL_CreateContext(platform.window);

// Check window and glContext have been initialized succesfully
// Check window and glContext have been initialized successfully
if ((platform.window != NULL) && (platform.glContext != NULL))
{
CORE.Window.ready = true;
Expand Down Expand Up @@ -1362,7 +1362,7 @@ int InitPlatform(void)
SDL_EventState(SDL_DROPFILE, SDL_ENABLE);
//----------------------------------------------------------------------------

// Initialize timming system
// Initialize timing system
//----------------------------------------------------------------------------
// NOTE: No need to call InitTimer(), let SDL manage it internally
CORE.Time.previous = GetTime(); // Get time as double
Expand Down
2 changes: 1 addition & 1 deletion src/platforms/rcore_drm.c
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@ void PollInputEvents(void)
if (!platform.eventKeyboardMode) ProcessKeyboard();

// NOTE: Mouse input events polling is done asynchronously in another pthread - EventThread()
// NOTE: Gamepad (Joystick) input events polling is done asynchonously in another pthread - GamepadThread()
// NOTE: Gamepad (Joystick) input events polling is done asynchronously in another pthread - GamepadThread()
#endif

// Handle the mouse/touch/gestures events:
Expand Down
6 changes: 3 additions & 3 deletions src/platforms/rcore_template.c
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ void PollInputEvents(void)
CORE.Input.Keyboard.keyRepeatInFrame[i] = 0;
}

// TODO: Poll input events for current plaform
// TODO: Poll input events for current platform
}


Expand Down Expand Up @@ -561,13 +561,13 @@ int InitPlatform(void)

// TODO: Initialize input events system
// It could imply keyboard, mouse, gamepad, touch...
// Depending on the platform libraries/SDK it could use a callbacks mechanims
// Depending on the platform libraries/SDK it could use a callback mechanism
// For system events and inputs evens polling on a per-frame basis, use PollInputEvents()
//----------------------------------------------------------------------------
// ...
//----------------------------------------------------------------------------

// TODO: Initialize timming system
// TODO: Initialize timing system
//----------------------------------------------------------------------------
InitTimer();
//----------------------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions src/platforms/rcore_web.c
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,7 @@ void PollInputEvents(void)

// TODO: This code does not seem to do anything??
//if (CORE.Window.eventWaiting) glfwWaitEvents(); // Wait for in input events before continue (drawing is paused)
//else glfwPollEvents(); // Poll input events: keyboard/mouse/window events (callbacks) --> WARNING: Where is key input reseted?
//else glfwPollEvents(); // Poll input events: keyboard/mouse/window events (callbacks) --> WARNING: Where is key input reset?
}

//----------------------------------------------------------------------------------
Expand Down Expand Up @@ -937,7 +937,7 @@ int InitPlatform(void)
emscripten_set_gamepaddisconnected_callback(NULL, 1, EmscriptenGamepadCallback);
//----------------------------------------------------------------------------

// Initialize timming system
// Initialize timing system
//----------------------------------------------------------------------------
InitTimer();
//----------------------------------------------------------------------------
Expand Down

0 comments on commit fe53ba8

Please sign in to comment.