win32 backend
This commit is contained in:
parent
cb111ad15e
commit
69a1a0d6fd
|
|
@ -17,7 +17,8 @@ fn setDesktopPlatform(raylib: *std.Build.Step.Compile, platform: PlatformBackend
|
||||||
.rgfw => raylib.root_module.addCMacro("PLATFORM_DESKTOP_RGFW", ""),
|
.rgfw => raylib.root_module.addCMacro("PLATFORM_DESKTOP_RGFW", ""),
|
||||||
.sdl => raylib.root_module.addCMacro("PLATFORM_DESKTOP_SDL", ""),
|
.sdl => raylib.root_module.addCMacro("PLATFORM_DESKTOP_SDL", ""),
|
||||||
.android => raylib.root_module.addCMacro("PLATFORM_ANDROID", ""),
|
.android => raylib.root_module.addCMacro("PLATFORM_ANDROID", ""),
|
||||||
else => {},
|
.drm => {},
|
||||||
|
.win32 => raylib.root_module.addCMacro("PLATFORM_DESKTOP_WIN32", ""),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -180,11 +181,12 @@ fn compileRaylib(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.
|
||||||
raylib.addIncludePath(b.path("src/platforms"));
|
raylib.addIncludePath(b.path("src/platforms"));
|
||||||
switch (target.result.os.tag) {
|
switch (target.result.os.tag) {
|
||||||
.windows => {
|
.windows => {
|
||||||
|
try raylib_flags_arr.append("-DUNICODE");
|
||||||
switch (options.platform) {
|
switch (options.platform) {
|
||||||
.glfw => try c_source_files.append("src/rglfw.c"),
|
.glfw => try c_source_files.append("src/rglfw.c"),
|
||||||
.rgfw, .sdl, .drm, .android => {},
|
.rgfw, .sdl, .drm, .android, .win32 => {},
|
||||||
}
|
}
|
||||||
|
raylib.linkSystemLibrary("shcore");
|
||||||
raylib.linkSystemLibrary("winmm");
|
raylib.linkSystemLibrary("winmm");
|
||||||
raylib.linkSystemLibrary("gdi32");
|
raylib.linkSystemLibrary("gdi32");
|
||||||
raylib.linkSystemLibrary("opengl32");
|
raylib.linkSystemLibrary("opengl32");
|
||||||
|
|
@ -440,6 +442,7 @@ pub const PlatformBackend = enum {
|
||||||
sdl,
|
sdl,
|
||||||
drm,
|
drm,
|
||||||
android,
|
android,
|
||||||
|
win32,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub fn build(b: *std.Build) !void {
|
pub fn build(b: *std.Build) !void {
|
||||||
|
|
|
||||||
2006
src/platforms/rcore_desktop_win32.c
Normal file
2006
src/platforms/rcore_desktop_win32.c
Normal file
File diff suppressed because it is too large
Load Diff
|
|
@ -553,6 +553,8 @@ const char *TextFormat(const char *text, ...); // Formatting of tex
|
||||||
#include "platforms/rcore_desktop_sdl.c"
|
#include "platforms/rcore_desktop_sdl.c"
|
||||||
#elif (defined(PLATFORM_DESKTOP_RGFW) || defined(PLATFORM_WEB_RGFW))
|
#elif (defined(PLATFORM_DESKTOP_RGFW) || defined(PLATFORM_WEB_RGFW))
|
||||||
#include "platforms/rcore_desktop_rgfw.c"
|
#include "platforms/rcore_desktop_rgfw.c"
|
||||||
|
#elif defined(PLATFORM_DESKTOP_WIN32)
|
||||||
|
#include "platforms/rcore_desktop_win32.c"
|
||||||
#elif defined(PLATFORM_WEB)
|
#elif defined(PLATFORM_WEB)
|
||||||
#include "platforms/rcore_web.c"
|
#include "platforms/rcore_web.c"
|
||||||
#elif defined(PLATFORM_DRM)
|
#elif defined(PLATFORM_DRM)
|
||||||
|
|
@ -622,6 +624,8 @@ void InitWindow(int width, int height, const char *title)
|
||||||
TRACELOG(LOG_INFO, "Platform backend: DESKTOP (SDL)");
|
TRACELOG(LOG_INFO, "Platform backend: DESKTOP (SDL)");
|
||||||
#elif defined(PLATFORM_DESKTOP_RGFW)
|
#elif defined(PLATFORM_DESKTOP_RGFW)
|
||||||
TRACELOG(LOG_INFO, "Platform backend: 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)
|
#elif defined(PLATFORM_WEB_RGFW)
|
||||||
TRACELOG(LOG_INFO, "Platform backend: WEB (RGFW) (HTML5)");
|
TRACELOG(LOG_INFO, "Platform backend: WEB (RGFW) (HTML5)");
|
||||||
#elif defined(PLATFORM_WEB)
|
#elif defined(PLATFORM_WEB)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user