Skip to content

Commit 2947475

Browse files
fix linking errors
1 parent 0076937 commit 2947475

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

examples/metal/metal.m

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,12 @@
4848
int main(void)
4949
{
5050
id<MTLDevice> device = MTLCreateSystemDefaultDevice();
51-
if (!device)
51+
if (!device) {
52+
printf("faield to create metal device");
5253
exit(EXIT_FAILURE);
54+
}
5355

54-
RGFW_window* window = RGFW_createWindow("RGFW Metal example", RGFW_RECT(0, 0, 640, 480), RGFW_CENTER);
56+
RGFW_window* window = RGFW_createWindow("RGFW Metal example", RGFW_RECT(0, 0, 640, 480), RGFW_center);
5557

5658
CAMetalLayer* layer = [CAMetalLayer layer];
5759
layer.device = device;
@@ -60,7 +62,7 @@ int main(void)
6062
NSView* view = (NSView*)window->src.view;
6163
[view setLayer: layer];
6264
// [view setWantsLayer: YES]; (I think RGFW already sets this)
63-
65+
6466
MTLCompileOptions* compileOptions = [MTLCompileOptions new];
6567
compileOptions.languageVersion = MTLLanguageVersion1_1;
6668
NSError* compileError;

examples/minimal_links/minimal_links.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#define RGFW_IMPLEMENTATION
22
#define RGFW_NO_API
33
#define RGFW_WGL_LOAD
4+
#define RGFW_NO_IOKIT
45

56
#ifdef __linux__
67
#define XDL_IMPLEMENTATION
@@ -27,4 +28,4 @@ int main(void) {
2728
#ifdef __linux__
2829
XDL_close();
2930
#endif
30-
}
31+
}

0 commit comments

Comments
 (0)