Browse Source

Merge 341b45d523 into d4202a09e6

pull/4869/merge
Jonathan Marler 1 day ago
committed by GitHub
parent
commit
18a2cff427
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
3 changed files with 2016 additions and 3 deletions
  1. +6
    -3
      build.zig
  2. +2006
    -0
      src/platforms/rcore_desktop_win32.c
  3. +4
    -0
      src/rcore.c

+ 6
- 3
build.zig View File

@ -16,7 +16,8 @@ fn setDesktopPlatform(raylib: *std.Build.Step.Compile, platform: PlatformBackend
.glfw => raylib.root_module.addCMacro("PLATFORM_DESKTOP_GLFW", ""),
.rgfw => raylib.root_module.addCMacro("PLATFORM_DESKTOP_RGFW", ""),
.sdl => raylib.root_module.addCMacro("PLATFORM_DESKTOP_SDL", ""),
else => {},
.drm => {},
.win32 => raylib.root_module.addCMacro("PLATFORM_DESKTOP_WIN32", ""),
}
}
@ -179,11 +180,12 @@ fn compileRaylib(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.
raylib.addIncludePath(b.path("src/platforms"));
switch (target.result.os.tag) {
.windows => {
try raylib_flags_arr.append("-DUNICODE");
switch (options.platform) {
.glfw => try c_source_files.append("src/rglfw.c"),
.rgfw, .sdl, .drm => {},
.rgfw, .sdl, .drm, .win32 => {},
}
raylib.linkSystemLibrary("shcore");
raylib.linkSystemLibrary("winmm");
raylib.linkSystemLibrary("gdi32");
raylib.linkSystemLibrary("opengl32");
@ -389,6 +391,7 @@ pub const PlatformBackend = enum {
rgfw,
sdl,
drm,
win32,
};
pub fn build(b: *std.Build) !void {

+ 2006
- 0
src/platforms/rcore_desktop_win32.c
File diff suppressed because it is too large
View File


+ 4
- 0
src/rcore.c View File

@ -553,6 +553,8 @@ const char *TextFormat(const char *text, ...); // Formatting of tex
#include "platforms/rcore_desktop_sdl.c"
#elif (defined(PLATFORM_DESKTOP_RGFW) || defined(PLATFORM_WEB_RGFW))
#include "platforms/rcore_desktop_rgfw.c"
#elif defined(PLATFORM_DESKTOP_WIN32)
#include "platforms/rcore_desktop_win32.c"
#elif defined(PLATFORM_WEB)
#include "platforms/rcore_web.c"
#elif defined(PLATFORM_DRM)
@ -622,6 +624,8 @@ void InitWindow(int width, int height, const char *title)
TRACELOG(LOG_INFO, "Platform backend: DESKTOP (SDL)");
#elif defined(PLATFORM_DESKTOP_RGFW)
TRACELOG(LOG_INFO, "Platform backend: DESKTOP (RGFW)");
#elif defined(PLATFORM_DESKTOP_WIN32)
TRACELOG(LOG_INFO, "Platform backend: DESKTOP (WIN32)");
#elif defined(PLATFORM_WEB_RGFW)
TRACELOG(LOG_INFO, "Platform backend: WEB (RGFW) (HTML5)");
#elif defined(PLATFORM_WEB)

Loading…
Cancel
Save