update to work on windows
This commit is contained in:
parent
a8604946f6
commit
0349bfe50b
@ -2,6 +2,9 @@
|
||||
#include "stdio.h"
|
||||
#include "stdbool.h"
|
||||
#include <stdint.h>
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#endif
|
||||
#define FONTSTASH_IMPLEMENTATION
|
||||
#include "fontstash.h"
|
||||
|
||||
|
||||
18
src/main.zig
18
src/main.zig
@ -84,22 +84,22 @@ pub fn main() !void {
|
||||
var debug_allocator: std.heap.DebugAllocator(.{}) = .init;
|
||||
defer _ = debug_allocator.deinit();
|
||||
|
||||
if (builtin.mode == .ReleaseFast) {
|
||||
gpa = std.heap.smp_allocator;
|
||||
} else {
|
||||
if (builtin.mode == .Debug) {
|
||||
gpa = debug_allocator.allocator();
|
||||
} else {
|
||||
gpa = std.heap.smp_allocator;
|
||||
}
|
||||
|
||||
// TODO: Use tracy TracingAllocator
|
||||
|
||||
tracy.setThreadName("Main");
|
||||
|
||||
var sa: std.posix.Sigaction = .{
|
||||
.handler = .{ .handler = signalHandler },
|
||||
.mask = std.posix.sigemptyset(),
|
||||
.flags = std.posix.SA.RESTART,
|
||||
};
|
||||
std.posix.sigaction(std.posix.SIG.INT, &sa, null);
|
||||
// var sa: std.posix.Sigaction = .{
|
||||
// .handler = .{ .handler = signalHandler },
|
||||
// .mask = std.posix.sigemptyset(),
|
||||
// .flags = std.posix.SA.RESTART,
|
||||
// };
|
||||
// std.posix.sigaction(std.posix.SIG.INT, &sa, null);
|
||||
|
||||
sapp.run(.{
|
||||
.init_cb = init,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user