mirror of
https://github.com/raysan5/raylib.git
synced 2025-12-25 10:22:33 -05:00
Some formatting
This commit is contained in:
@ -78,28 +78,27 @@
|
||||
#if defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__)
|
||||
#include <sys/time.h> // Required for: timespec, nanosleep(), select() - POSIX
|
||||
|
||||
#if defined(_GLFW_X11) || defined(_GLFW_WAYLAND)
|
||||
#if defined(_GLFW_X11) || defined(_GLFW_WAYLAND)
|
||||
// Set appropriate expose macros based on available backends
|
||||
#if defined(_GLFW_X11)
|
||||
#define GLFW_EXPOSE_NATIVE_X11
|
||||
#define Font X11Font // Hack to fix 'Font' name collision
|
||||
#if defined(_GLFW_X11)
|
||||
#define GLFW_EXPOSE_NATIVE_X11
|
||||
#define Font X11Font // Hack to fix 'Font' name collision
|
||||
// The definition and references to the X11 Font type will be replaced by 'X11Font'
|
||||
// Works as long as the current file consistently references any X11 Font as X11Font
|
||||
// Since it is never referenced (as of writing), this does not pose an issue
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(_GLFW_WAYLAND)
|
||||
#define GLFW_EXPOSE_NATIVE_WAYLAND
|
||||
#endif
|
||||
#if defined(_GLFW_WAYLAND)
|
||||
#define GLFW_EXPOSE_NATIVE_WAYLAND
|
||||
#endif
|
||||
|
||||
#include "GLFW/glfw3native.h" // Include native header only once, regardless of how many backends are defined
|
||||
#include "GLFW/glfw3native.h" // Include native header only once, regardless of how many backends are defined
|
||||
// Required for: glfwGetX11Window() and glfwGetWaylandWindow()
|
||||
|
||||
#if defined(_GLFW_X11) // Clean up X11-specific hacks
|
||||
#undef Font // Revert hack and allow normal raylib Font usage
|
||||
#if defined(_GLFW_X11) // Clean up X11-specific hacks
|
||||
#undef Font // Revert hack and allow normal raylib Font usage
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#if defined(__APPLE__)
|
||||
#include <unistd.h> // Required for: usleep()
|
||||
|
||||
|
||||
@ -262,9 +262,9 @@ static bool DecoratedFromStyle(DWORD style)
|
||||
// Get window style from required flags
|
||||
static DWORD MakeWindowStyle(unsigned flags)
|
||||
{
|
||||
// We don't need this since we don't have any child windows, but I guess
|
||||
// it improves efficiency, plus, windows adds this flag automatically anyway
|
||||
// so it keeps our flags in sync with the OS
|
||||
// Flag is not needed because there are no child windows,
|
||||
// but supposedly it improves efficiency, plus, windows adds this
|
||||
// flag automatically anyway so it keeps flags in sync with the OS
|
||||
DWORD style = WS_CLIPSIBLINGS;
|
||||
|
||||
style |= (flags & FLAG_WINDOW_HIDDEN)? 0 : WS_VISIBLE;
|
||||
@ -1230,7 +1230,7 @@ void SwapScreenBuffer(void)
|
||||
// Get elapsed time measure in seconds
|
||||
double GetTime(void)
|
||||
{
|
||||
LARGE_INTEGER now;
|
||||
LARGE_INTEGER now = 0;
|
||||
QueryPerformanceCounter(&now);
|
||||
return (double)(now.QuadPart - CORE.Time.base)/(double)platform.timerFrequency.QuadPart;
|
||||
}
|
||||
@ -1987,7 +1987,7 @@ static void HandleKey(WPARAM wparam, LPARAM lparam, char state)
|
||||
{
|
||||
CORE.Input.Keyboard.currentKeyState[key] = state;
|
||||
|
||||
if ((key == KEY_ESCAPE) && (state == 1)) CORE.Window.shouldClose = 1;
|
||||
if ((key == KEY_ESCAPE) && (state == 1)) CORE.Window.shouldClose = true;
|
||||
}
|
||||
else TRACELOG(LOG_WARNING, "INPUT: Unknown (or currently unhandled) virtual keycode %d (0x%x)", wparam, wparam);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user