mirror of
https://github.com/raysan5/raylib.git
synced 2026-06-27 21:40:29 +00:00
Format tweaks
This commit is contained in:
@@ -462,20 +462,22 @@ void RemapMouseToTouch(int touchAction);
|
||||
// ---------------------------------------------------------------------------------
|
||||
// RGFW Callbacks (instead of the older polling)
|
||||
// ---------------------------------------------------------------------------------
|
||||
static void RGFW_cb_mousenotifyfunc(const RGFW_event* e)
|
||||
static void RGFW_cb_mousenotifyfunc(const RGFW_event *e)
|
||||
{
|
||||
if (e->common.win != platform.window) return;
|
||||
|
||||
CORE.Input.Mouse.cursorOnScreen = e->mouse.inWindow;
|
||||
}
|
||||
// static void RGFW_cb_windowclosefunc(const RGFW_event* e)
|
||||
// {
|
||||
// if (e->common.win != platform.window) return;
|
||||
/*
|
||||
static void RGFW_cb_windowclosefunc(const RGFW_event *e)
|
||||
{
|
||||
if (e->common.win != platform.window) return;
|
||||
|
||||
// // we don't want to close here. raylib handles it
|
||||
// // RGFW_window_setShouldClose(platform.window, true);
|
||||
// }
|
||||
static void RGFW_cb_dropfunc(const RGFW_event* e)
|
||||
// Don't want to close here, raylib handles it
|
||||
//RGFW_window_setShouldClose(platform.window, true);
|
||||
}
|
||||
*/
|
||||
static void RGFW_cb_dropfunc(const RGFW_event *e)
|
||||
{
|
||||
if (e->common.win != platform.window) return;
|
||||
|
||||
@@ -497,7 +499,7 @@ static void RGFW_cb_dropfunc(const RGFW_event* e)
|
||||
}
|
||||
else TRACELOG(LOG_WARNING, "FILE: Maximum drag and drop files at once is limited to 1024 files!");
|
||||
}
|
||||
static void RGFW_cb_windowresizefunc(const RGFW_event* e)
|
||||
static void RGFW_cb_windowresizefunc(const RGFW_event *e)
|
||||
{
|
||||
if (e->common.win != platform.window) return;
|
||||
|
||||
@@ -506,7 +508,7 @@ static void RGFW_cb_windowresizefunc(const RGFW_event* e)
|
||||
#if defined(__APPLE__)
|
||||
if (FLAG_IS_SET(CORE.Window.flags, FLAG_WINDOW_HIGHDPI))
|
||||
{
|
||||
RGFW_monitor* currentMonitor = RGFW_window_getMonitor(platform.window);
|
||||
RGFW_monitor *currentMonitor = RGFW_window_getMonitor(platform.window);
|
||||
SetupViewport(platform.window->w*currentMonitor->pixelRatio, platform.window->h*currentMonitor->pixelRatio);
|
||||
CORE.Window.screenScale = MatrixScale(currentMonitor->pixelRatio, currentMonitor->pixelRatio, 1.0f);
|
||||
|
||||
@@ -551,7 +553,7 @@ static void RGFW_cb_windowresizefunc(const RGFW_event* e)
|
||||
|
||||
#if defined(GRAPHICS_API_OPENGL_SOFTWARE)
|
||||
#if defined(__APPLE__)
|
||||
RGFW_monitor* currentMonitor = RGFW_window_getMonitor(platform.window);
|
||||
RGFW_monitor *currentMonitor = RGFW_window_getMonitor(platform.window);
|
||||
CORE.Window.screenScale = MatrixScale(currentMonitor->pixelRatio, currentMonitor->pixelRatio, 1.0f);
|
||||
SetupViewport(platform.window->w*currentMonitor->pixelRatio, platform.window->h*currentMonitor->pixelRatio);
|
||||
|
||||
@@ -585,19 +587,19 @@ static void RGFW_cb_windowresizefunc(const RGFW_event* e)
|
||||
}
|
||||
#endif
|
||||
}
|
||||
static void RGFW_cb_windowmaximizefunc(const RGFW_event* e)
|
||||
static void RGFW_cb_windowmaximizefunc(const RGFW_event *e)
|
||||
{
|
||||
if (e->common.win != platform.window) return;
|
||||
|
||||
FLAG_SET(CORE.Window.flags, FLAG_WINDOW_MAXIMIZED); // The window was maximized
|
||||
}
|
||||
static void RGFW_cb_windowminimizefunc(const RGFW_event* e)
|
||||
static void RGFW_cb_windowminimizefunc(const RGFW_event *e)
|
||||
{
|
||||
if (e->common.win != platform.window) return;
|
||||
|
||||
FLAG_SET(CORE.Window.flags, FLAG_WINDOW_MINIMIZED); // The window was iconified
|
||||
}
|
||||
static void RGFW_cb_windowrestorefunc(const RGFW_event* e)
|
||||
static void RGFW_cb_windowrestorefunc(const RGFW_event *e)
|
||||
{
|
||||
if (e->common.win != platform.window) return;
|
||||
|
||||
@@ -606,14 +608,14 @@ static void RGFW_cb_windowrestorefunc(const RGFW_event* e)
|
||||
if (RGFW_window_isMinimized(platform.window))
|
||||
FLAG_CLEAR(CORE.Window.flags, FLAG_WINDOW_MINIMIZED); // The window was restored
|
||||
}
|
||||
static void RGFW_cb_windowmovefunc(const RGFW_event* e)
|
||||
static void RGFW_cb_windowmovefunc(const RGFW_event *e)
|
||||
{
|
||||
if (e->common.win != platform.window) return;
|
||||
|
||||
CORE.Window.position.x = platform.window->x;
|
||||
CORE.Window.position.y = platform.window->x;
|
||||
}
|
||||
static void RGFW_cb_keycharfunc(const RGFW_event* e)
|
||||
static void RGFW_cb_keycharfunc(const RGFW_event *e)
|
||||
{
|
||||
if (e->common.win != platform.window) return;
|
||||
|
||||
@@ -626,14 +628,14 @@ static void RGFW_cb_keycharfunc(const RGFW_event* e)
|
||||
CORE.Input.Keyboard.charPressedQueueCount++;
|
||||
}
|
||||
}
|
||||
static void RGFW_cb_scrollfunc(const RGFW_event* e)
|
||||
static void RGFW_cb_scrollfunc(const RGFW_event *e)
|
||||
{
|
||||
if (e->common.win != platform.window) return;
|
||||
|
||||
CORE.Input.Mouse.currentWheelMove.x += e->delta.x;
|
||||
CORE.Input.Mouse.currentWheelMove.y += e->delta.y;
|
||||
}
|
||||
static void RGFW_cb_mousebuttonfunc(const RGFW_event* e)
|
||||
static void RGFW_cb_mousebuttonfunc(const RGFW_event *e)
|
||||
{
|
||||
if (e->common.win != platform.window) return;
|
||||
|
||||
@@ -658,7 +660,7 @@ static void RGFW_cb_mousebuttonfunc(const RGFW_event* e)
|
||||
RemapMouseToTouch(0);
|
||||
}
|
||||
}
|
||||
static void RGFW_cb_mouserawmotionfunc(const RGFW_event* e)
|
||||
static void RGFW_cb_mouserawmotionfunc(const RGFW_event *e)
|
||||
{
|
||||
if (!RGFW_window_isRawMouseMode(platform.window))
|
||||
{
|
||||
@@ -686,7 +688,7 @@ static void RGFW_cb_mouserawmotionfunc(const RGFW_event* e)
|
||||
CORE.Input.Touch.position[0] = CORE.Input.Mouse.currentPosition;
|
||||
RemapMouseToTouch(2);
|
||||
}
|
||||
static void RGFW_cb_mousemotionfunc(const RGFW_event* e)
|
||||
static void RGFW_cb_mousemotionfunc(const RGFW_event *e)
|
||||
{
|
||||
if (RGFW_window_isRawMouseMode(platform.window))
|
||||
{
|
||||
@@ -776,7 +778,7 @@ void ToggleFullscreen(void)
|
||||
CORE.Window.previousPosition.y = currentPosition.y;
|
||||
CORE.Window.previousScreen = CORE.Window.screen;
|
||||
|
||||
RGFW_monitor* currentMonitor = RGFW_window_getMonitor(platform.window);
|
||||
RGFW_monitor *currentMonitor = RGFW_window_getMonitor(platform.window);
|
||||
RGFW_monitor_scaleToWindow(currentMonitor, platform.window);
|
||||
RGFW_window_setFullscreen(platform.window, 1);
|
||||
}
|
||||
@@ -921,7 +923,7 @@ void SetWindowState(unsigned int flags)
|
||||
}
|
||||
if (FLAG_IS_SET(flags, FLAG_MSAA_4X_HINT))
|
||||
{
|
||||
RGFW_glHints* hints = RGFW_getGlobalHints_OpenGL();
|
||||
RGFW_glHints *hints = RGFW_getGlobalHints_OpenGL();
|
||||
hints->samples = 4;
|
||||
RGFW_setGlobalHints_OpenGL(hints);
|
||||
}
|
||||
@@ -997,7 +999,7 @@ void ClearWindowState(unsigned int flags)
|
||||
}
|
||||
if (FLAG_IS_SET(flags, FLAG_MSAA_4X_HINT))
|
||||
{
|
||||
RGFW_glHints* hints = RGFW_getGlobalHints_OpenGL();
|
||||
RGFW_glHints *hints = RGFW_getGlobalHints_OpenGL();
|
||||
hints->samples = 0;
|
||||
RGFW_setGlobalHints_OpenGL(hints);
|
||||
}
|
||||
@@ -1092,7 +1094,7 @@ void SetWindowSize(int width, int height)
|
||||
Vector2 scaleDpi = GetWindowScaleDPI();
|
||||
|
||||
#if defined(__APPLE__)
|
||||
RGFW_monitor* currentMonitor = RGFW_window_getMonitor(platform.window);
|
||||
RGFW_monitor *currentMonitor = RGFW_window_getMonitor(platform.window);
|
||||
CORE.Window.screenScale = MatrixScale(currentMonitor->pixelRatio, currentMonitor->pixelRatio, 1.0f);
|
||||
|
||||
CORE.Window.render.width = CORE.Window.screen.width*currentMonitor->pixelRatio;
|
||||
@@ -1643,7 +1645,7 @@ void PollInputEvents(void)
|
||||
case GAMEPAD_AXIS_RIGHT_TRIGGER:
|
||||
CORE.Input.Gamepad.axisState[gamepadIndex][axis] = platform.minigamepad.gamepads[gamepadIndex].axes[gamepad_event.axis].value;
|
||||
|
||||
/* trigger button press when axis is all the way */
|
||||
// Trigger button press when axis is all the way
|
||||
int button = (axis == GAMEPAD_AXIS_LEFT_TRIGGER) ? GAMEPAD_BUTTON_LEFT_TRIGGER_2 : GAMEPAD_BUTTON_RIGHT_TRIGGER_2;
|
||||
int pressed = (platform.minigamepad.gamepads[gamepadIndex].axes[gamepad_event.axis].value >= 1.0f);
|
||||
|
||||
@@ -1763,7 +1765,7 @@ int InitPlatform(void)
|
||||
|
||||
// NOTE: Some OpenGL context attributes must be set before window creation
|
||||
// Check selection OpenGL version
|
||||
RGFW_glHints* hints = RGFW_getGlobalHints_OpenGL();
|
||||
RGFW_glHints *hints = RGFW_getGlobalHints_OpenGL();
|
||||
if (rlGetVersion() == RL_OPENGL_21)
|
||||
{
|
||||
hints->major = 2;
|
||||
@@ -1838,7 +1840,7 @@ int InitPlatform(void)
|
||||
Vector2 scaleDpi = GetWindowScaleDPI();
|
||||
|
||||
#if defined(__APPLE__)
|
||||
RGFW_monitor* currentMonitor = RGFW_window_getMonitor(platform.window);
|
||||
RGFW_monitor *currentMonitor = RGFW_window_getMonitor(platform.window);
|
||||
CORE.Window.screenScale = MatrixScale(currentMonitor->pixelRatio, currentMonitor->pixelRatio, 1.0f);
|
||||
|
||||
CORE.Window.render.width = CORE.Window.screen.width*currentMonitor->pixelRatio;
|
||||
@@ -1856,7 +1858,7 @@ int InitPlatform(void)
|
||||
#if defined(GRAPHICS_API_OPENGL_SOFTWARE)
|
||||
// apple always scales for retina
|
||||
#if defined(__APPLE__)
|
||||
RGFW_monitor* currentMonitor = RGFW_window_getMonitor(platform.window);
|
||||
RGFW_monitor *currentMonitor = RGFW_window_getMonitor(platform.window);
|
||||
CORE.Window.screenScale = MatrixScale(currentMonitor->pixelRatio, currentMonitor->pixelRatio, 1.0f);
|
||||
|
||||
CORE.Window.render.width = CORE.Window.screen.width*currentMonitor->pixelRatio;
|
||||
@@ -2045,7 +2047,7 @@ void RemapMouseToTouch(int touchAction)
|
||||
gestureEvent.pointCount = 1;
|
||||
|
||||
// Register touch points position, only one point registered
|
||||
if (touchAction == 2 /* || realTouch */) gestureEvent.position[0] = CORE.Input.Touch.position[0];
|
||||
if (touchAction == 2 /*|| realTouch*/) gestureEvent.position[0] = CORE.Input.Touch.position[0];
|
||||
else gestureEvent.position[0] = GetMousePosition();
|
||||
|
||||
// Normalize gestureEvent.position[0] for CORE.Window.screen.width and CORE.Window.screen.height
|
||||
|
||||
@@ -566,100 +566,100 @@ static KeyboardKey GetKeyFromWparam(WPARAM wparam)
|
||||
case 'X': return KEY_X;
|
||||
case 'Y': return KEY_Y;
|
||||
case 'Z': return KEY_Z;
|
||||
/* case VK_LWIN: return KEY_; */
|
||||
/* case VK_RWIN: return KEY_; */
|
||||
/* case VK_APPS: return KEY_; */
|
||||
/* case VK_SLEEP: return KEY_; */
|
||||
/* case VK_NUMPAD0: return KEY_; */
|
||||
/* case VK_NUMPAD1: return KEY_; */
|
||||
/* case VK_NUMPAD2: return KEY_; */
|
||||
/* case VK_NUMPAD3: return KEY_; */
|
||||
/* case VK_NUMPAD4: return KEY_; */
|
||||
/* case VK_NUMPAD5: return KEY_; */
|
||||
/* case VK_NUMPAD6: return KEY_; */
|
||||
/* case VK_NUMPAD7: return KEY_; */
|
||||
/* case VK_NUMPAD8: return KEY_; */
|
||||
/* case VK_NUMPAD9: return KEY_; */
|
||||
/* case VK_MULTIPLY: return KEY_; */
|
||||
/* case VK_ADD: return KEY_; */
|
||||
/* case VK_SEPARATOR: return KEY_; */
|
||||
/* case VK_SUBTRACT: return KEY_; */
|
||||
/* case VK_DECIMAL: return KEY_; */
|
||||
/* case VK_DIVIDE: return KEY_; */
|
||||
/* case VK_F1: return KEY_; */
|
||||
/* case VK_F2: return KEY_; */
|
||||
/* case VK_F3: return KEY_; */
|
||||
/* case VK_F4: return KEY_; */
|
||||
/* case VK_F5: return KEY_; */
|
||||
/* case VK_F6: return KEY_; */
|
||||
/* case VK_F7: return KEY_; */
|
||||
/* case VK_F8: return KEY_; */
|
||||
/* case VK_F9: return KEY_; */
|
||||
/* case VK_F10: return KEY_; */
|
||||
/* case VK_F11: return KEY_; */
|
||||
/* case VK_F12: return KEY_; */
|
||||
/* case VK_F13: return KEY_; */
|
||||
/* case VK_F14: return KEY_; */
|
||||
/* case VK_F15: return KEY_; */
|
||||
/* case VK_F16: return KEY_; */
|
||||
/* case VK_F17: return KEY_; */
|
||||
/* case VK_F18: return KEY_; */
|
||||
/* case VK_F19: return KEY_; */
|
||||
/* case VK_F20: return KEY_; */
|
||||
/* case VK_F21: return KEY_; */
|
||||
/* case VK_F22: return KEY_; */
|
||||
/* case VK_F23: return KEY_; */
|
||||
/* case VK_F24: return KEY_; */
|
||||
/* case VK_NUMLOCK: return KEY_; */
|
||||
/* case VK_SCROLL: return KEY_; */
|
||||
/* case VK_LSHIFT: return KEY_; */
|
||||
/* case VK_RSHIFT: return KEY_; */
|
||||
/* case VK_LCONTROL: return KEY_; */
|
||||
/* case VK_RCONTROL: return KEY_; */
|
||||
/* case VK_LMENU: return KEY_; */
|
||||
/* case VK_RMENU: return KEY_; */
|
||||
/* case VK_BROWSER_BACK: return KEY_; */
|
||||
/* case VK_BROWSER_FORWARD: return KEY_; */
|
||||
/* case VK_BROWSER_REFRESH: return KEY_; */
|
||||
/* case VK_BROWSER_STOP: return KEY_; */
|
||||
/* case VK_BROWSER_SEARCH: return KEY_; */
|
||||
/* case VK_BROWSER_FAVORITES: return KEY_; */
|
||||
/* case VK_BROWSER_HOME: return KEY_; */
|
||||
/* case VK_VOLUME_MUTE: return KEY_; */
|
||||
/* case VK_VOLUME_DOWN: return KEY_; */
|
||||
/* case VK_VOLUME_UP: return KEY_; */
|
||||
/* case VK_MEDIA_NEXT_TRACK: return KEY_; */
|
||||
/* case VK_MEDIA_PREV_TRACK: return KEY_; */
|
||||
/* case VK_MEDIA_STOP: return KEY_; */
|
||||
/* case VK_MEDIA_PLAY_PAUSE: return KEY_; */
|
||||
/* case VK_LAUNCH_MAIL: return KEY_; */
|
||||
/* case VK_LAUNCH_MEDIA_SELECT: return KEY_; */
|
||||
/* case VK_LAUNCH_APP1: return KEY_; */
|
||||
/* case VK_LAUNCH_APP2: return KEY_; */
|
||||
/* case VK_OEM_1: return KEY_; */
|
||||
/* case VK_OEM_PLUS: return KEY_; */
|
||||
/* case VK_OEM_COMMA: return KEY_; */
|
||||
/* case VK_OEM_MINUS: return KEY_; */
|
||||
/* case VK_OEM_PERIOD: return KEY_; */
|
||||
/* case VK_OEM_2: return KEY_; */
|
||||
/* case VK_OEM_3: return KEY_; */
|
||||
/* case VK_OEM_4: return KEY_; */
|
||||
/* case VK_OEM_5: return KEY_; */
|
||||
/* case VK_OEM_6: return KEY_; */
|
||||
/* case VK_OEM_7: return KEY_; */
|
||||
/* case VK_OEM_8: return KEY_; */
|
||||
/* case VK_OEM_102: return KEY_; */
|
||||
/* case VK_PROCESSKEY: return KEY_; */
|
||||
/* case VK_PACKET: return KEY_; */
|
||||
/* case VK_ATTN: return KEY_; */
|
||||
/* case VK_CRSEL: return KEY_; */
|
||||
/* case VK_EXSEL: return KEY_; */
|
||||
/* case VK_EREOF: return KEY_; */
|
||||
/* case VK_PLAY: return KEY_; */
|
||||
/* case VK_ZOOM: return KEY_; */
|
||||
/* case VK_NONAME: return KEY_; */
|
||||
/* case VK_PA1: return KEY_; */
|
||||
/* case VK_OEM_CLEAR: return KEY_; */
|
||||
//case VK_LWIN: return KEY_;
|
||||
//case VK_RWIN: return KEY_;
|
||||
//case VK_APPS: return KEY_;
|
||||
//case VK_SLEEP: return KEY_;
|
||||
//case VK_NUMPAD0: return KEY_;
|
||||
//case VK_NUMPAD1: return KEY_;
|
||||
//case VK_NUMPAD2: return KEY_;
|
||||
//case VK_NUMPAD3: return KEY_;
|
||||
//case VK_NUMPAD4: return KEY_;
|
||||
//case VK_NUMPAD5: return KEY_;
|
||||
//case VK_NUMPAD6: return KEY_;
|
||||
//case VK_NUMPAD7: return KEY_;
|
||||
//case VK_NUMPAD8: return KEY_;
|
||||
//case VK_NUMPAD9: return KEY_;
|
||||
//case VK_MULTIPLY: return KEY_;
|
||||
//case VK_ADD: return KEY_;
|
||||
//case VK_SEPARATOR: return KEY_;
|
||||
//case VK_SUBTRACT: return KEY_;
|
||||
//case VK_DECIMAL: return KEY_;
|
||||
//case VK_DIVIDE: return KEY_;
|
||||
//case VK_F1: return KEY_;
|
||||
//case VK_F2: return KEY_;
|
||||
//case VK_F3: return KEY_;
|
||||
//case VK_F4: return KEY_;
|
||||
//case VK_F5: return KEY_;
|
||||
//case VK_F6: return KEY_;
|
||||
//case VK_F7: return KEY_;
|
||||
//case VK_F8: return KEY_;
|
||||
//case VK_F9: return KEY_;
|
||||
//case VK_F10: return KEY_;
|
||||
//case VK_F11: return KEY_;
|
||||
//case VK_F12: return KEY_;
|
||||
//case VK_F13: return KEY_;
|
||||
//case VK_F14: return KEY_;
|
||||
//case VK_F15: return KEY_;
|
||||
//case VK_F16: return KEY_;
|
||||
//case VK_F17: return KEY_;
|
||||
//case VK_F18: return KEY_;
|
||||
//case VK_F19: return KEY_;
|
||||
//case VK_F20: return KEY_;
|
||||
//case VK_F21: return KEY_;
|
||||
//case VK_F22: return KEY_;
|
||||
//case VK_F23: return KEY_;
|
||||
//case VK_F24: return KEY_;
|
||||
//case VK_NUMLOCK: return KEY_;
|
||||
//case VK_SCROLL: return KEY_;
|
||||
//case VK_LSHIFT: return KEY_;
|
||||
//case VK_RSHIFT: return KEY_;
|
||||
//case VK_LCONTROL: return KEY_;
|
||||
//case VK_RCONTROL: return KEY_;
|
||||
//case VK_LMENU: return KEY_;
|
||||
//case VK_RMENU: return KEY_;
|
||||
//case VK_BROWSER_BACK: return KEY_;
|
||||
//case VK_BROWSER_FORWARD: return KEY_;
|
||||
//case VK_BROWSER_REFRESH: return KEY_;
|
||||
//case VK_BROWSER_STOP: return KEY_;
|
||||
//case VK_BROWSER_SEARCH: return KEY_;
|
||||
//case VK_BROWSER_FAVORITES: return KEY_;
|
||||
//case VK_BROWSER_HOME: return KEY_;
|
||||
//case VK_VOLUME_MUTE: return KEY_;
|
||||
//case VK_VOLUME_DOWN: return KEY_;
|
||||
//case VK_VOLUME_UP: return KEY_;
|
||||
//case VK_MEDIA_NEXT_TRACK: return KEY_;
|
||||
//case VK_MEDIA_PREV_TRACK: return KEY_;
|
||||
//case VK_MEDIA_STOP: return KEY_;
|
||||
//case VK_MEDIA_PLAY_PAUSE: return KEY_;
|
||||
//case VK_LAUNCH_MAIL: return KEY_;
|
||||
//case VK_LAUNCH_MEDIA_SELECT: return KEY_;
|
||||
//case VK_LAUNCH_APP1: return KEY_;
|
||||
//case VK_LAUNCH_APP2: return KEY_;
|
||||
//case VK_OEM_1: return KEY_;
|
||||
//case VK_OEM_PLUS: return KEY_;
|
||||
//case VK_OEM_COMMA: return KEY_;
|
||||
//case VK_OEM_MINUS: return KEY_;
|
||||
//case VK_OEM_PERIOD: return KEY_;
|
||||
//case VK_OEM_2: return KEY_;
|
||||
//case VK_OEM_3: return KEY_;
|
||||
//case VK_OEM_4: return KEY_;
|
||||
//case VK_OEM_5: return KEY_;
|
||||
//case VK_OEM_6: return KEY_;
|
||||
//case VK_OEM_7: return KEY_;
|
||||
//case VK_OEM_8: return KEY_;
|
||||
//case VK_OEM_102: return KEY_;
|
||||
//case VK_PROCESSKEY: return KEY_;
|
||||
//case VK_PACKET: return KEY_;
|
||||
//case VK_ATTN: return KEY_;
|
||||
//case VK_CRSEL: return KEY_;
|
||||
//case VK_EXSEL: return KEY_;
|
||||
//case VK_EREOF: return KEY_;
|
||||
//case VK_PLAY: return KEY_;
|
||||
//case VK_ZOOM: return KEY_;
|
||||
//case VK_NONAME: return KEY_;
|
||||
//case VK_PA1: return KEY_;
|
||||
//case VK_OEM_CLEAR: return KEY_;
|
||||
default: return KEY_NULL;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -633,7 +633,7 @@ void SetWindowSize(int width, int height)
|
||||
// When resizing the canvas, several elements must be considered:
|
||||
// - CSS canvas size: Web layout size, logical pixels
|
||||
// - Canvas contained framebuffer resolution
|
||||
// * Browser monitor, device pixel ratio (HighDPI)
|
||||
// - Browser monitor, device pixel ratio (HighDPI)
|
||||
|
||||
double canvasCssWidth = 0.0;
|
||||
double canvasCssHeight = 0.0;
|
||||
|
||||
@@ -344,7 +344,7 @@ typedef enum {
|
||||
// Audio buffer struct
|
||||
struct rAudioBuffer {
|
||||
ma_data_converter converter; // Audio data converter
|
||||
unsigned char* converterResidual; // Cached residual input frames for use by the converter
|
||||
unsigned char *converterResidual; // Cached residual input frames for use by the converter
|
||||
unsigned int converterResidualCount; // The number of valid frames sitting in converterResidual
|
||||
|
||||
AudioCallback callback; // Audio buffer callback for buffer filling on audio threads
|
||||
|
||||
@@ -2714,13 +2714,13 @@ RMAPI void MatrixDecompose(Matrix mat, Vector3 *translation, Quaternion *rotatio
|
||||
stabilizer = fmaxf(stabilizer, fabsf(matColumns[i].y));
|
||||
stabilizer = fmaxf(stabilizer, fabsf(matColumns[i].z));
|
||||
}
|
||||
matColumns[0] = Vector3Scale(matColumns[0], 1.0f / stabilizer);
|
||||
matColumns[1] = Vector3Scale(matColumns[1], 1.0f / stabilizer);
|
||||
matColumns[2] = Vector3Scale(matColumns[2], 1.0f / stabilizer);
|
||||
matColumns[0] = Vector3Scale(matColumns[0], 1.0f/stabilizer);
|
||||
matColumns[1] = Vector3Scale(matColumns[1], 1.0f/stabilizer);
|
||||
matColumns[2] = Vector3Scale(matColumns[2], 1.0f/stabilizer);
|
||||
|
||||
// X Scale
|
||||
scl.x = Vector3Length(matColumns[0]);
|
||||
if (scl.x > eps) matColumns[0] = Vector3Scale(matColumns[0], 1.0f / scl.x);
|
||||
if (scl.x > eps) matColumns[0] = Vector3Scale(matColumns[0], 1.0f/scl.x);
|
||||
|
||||
// Compute XY shear and make col2 orthogonal
|
||||
shear[0] = Vector3DotProduct(matColumns[0], matColumns[1]);
|
||||
@@ -2730,7 +2730,7 @@ RMAPI void MatrixDecompose(Matrix mat, Vector3 *translation, Quaternion *rotatio
|
||||
scl.y = Vector3Length(matColumns[1]);
|
||||
if (scl.y > eps)
|
||||
{
|
||||
matColumns[1] = Vector3Scale(matColumns[1], 1.0f / scl.y);
|
||||
matColumns[1] = Vector3Scale(matColumns[1], 1.0f/scl.y);
|
||||
shear[0] /= scl.y; // Correct XY shear
|
||||
}
|
||||
|
||||
@@ -2744,7 +2744,7 @@ RMAPI void MatrixDecompose(Matrix mat, Vector3 *translation, Quaternion *rotatio
|
||||
scl.z = Vector3Length(matColumns[2]);
|
||||
if (scl.z > eps)
|
||||
{
|
||||
matColumns[2] = Vector3Scale(matColumns[2], 1.0f / scl.z);
|
||||
matColumns[2] = Vector3Scale(matColumns[2], 1.0f/scl.z);
|
||||
shear[1] /= scl.z; // Correct XZ shear
|
||||
shear[2] /= scl.z; // Correct YZ shear
|
||||
}
|
||||
|
||||
@@ -7212,7 +7212,7 @@ static Model LoadM3D(const char *fileName)
|
||||
return model;
|
||||
}
|
||||
|
||||
#define M3D_ANIMDELAY 17 // Animation frames delay, (~1000 ms/60 FPS = 16.666666* ms)
|
||||
#define M3D_ANIMDELAY 17 // Animation frames delay, (~1000 ms/60 FPS = 16.666666 ms)
|
||||
|
||||
// Load M3D animation data
|
||||
static ModelAnimation *LoadModelAnimationsM3D(const char *fileName, int *animCount)
|
||||
|
||||
@@ -947,8 +947,8 @@ Image GenImageFontAtlas(const GlyphInfo *glyphs, Rectangle **glyphRecs, int glyp
|
||||
// Security fix: check both lower and upper bounds
|
||||
if (destX >= 0 && destX < atlas.width && destY >= 0 && destY < atlas.height)
|
||||
{
|
||||
((unsigned char *)atlas.data)[destY * atlas.width + destX] =
|
||||
((unsigned char *)glyphs[i].image.data)[y * glyphs[i].image.width + x];
|
||||
((unsigned char *)atlas.data)[destY*atlas.width + destX] =
|
||||
((unsigned char *)glyphs[i].image.data)[y*glyphs[i].image.width + x];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user