fix: Resource embedding not working on Windows
This commit is contained in:
parent
d345508195
commit
92bb852921
@ -1,15 +1,32 @@
|
|||||||
#define RESOURCE(name, path) __asm__ ( \
|
#if defined(OS_WINDOWS)
|
||||||
".section .rodata\n" \
|
#define RESOURCE(name, path) __asm__ ( \
|
||||||
".global " #name "\n" \
|
".section .rodata\n" \
|
||||||
".global " #name "_size\n" \
|
".global " #name "\n" \
|
||||||
#name ":\n" \
|
".global " #name "_size\n" \
|
||||||
|
#name ":\n" \
|
||||||
|
".incbin \"" path "\"\n" \
|
||||||
|
#name "_size:\n" \
|
||||||
|
".int " #name "_size - " #name "\n" \
|
||||||
|
".align 8\n" \
|
||||||
|
)
|
||||||
|
#else
|
||||||
|
|
||||||
|
#define RESOURCE(name, path) __asm__ ( \
|
||||||
|
".section .rodata\n" \
|
||||||
|
".global " #name "\n" \
|
||||||
|
".global " #name "_size\n" \
|
||||||
|
#name ":\n" \
|
||||||
".incbin \"" path "\"\n" \
|
".incbin \"" path "\"\n" \
|
||||||
".type " #name ", @object\n" \
|
".type " #name ", @object\n" \
|
||||||
".size " #name "_size, 1\n" \
|
".size " #name "_size, 1\n" \
|
||||||
#name "_size:\n" \
|
#name "_size:\n" \
|
||||||
".int " #name "_size - " #name "\n" \
|
".int " #name "_size - " #name "\n" \
|
||||||
".align 8\n" \
|
".align 8\n" \
|
||||||
)
|
)
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
RESOURCE(banner_light, "../../../res/resources/banner_light.png");
|
RESOURCE(banner_light, "../../../res/resources/banner_light.png");
|
||||||
RESOURCE(banner_dark, "../../../res/resources/banner_dark.png");
|
RESOURCE(banner_dark, "../../../res/resources/banner_dark.png");
|
||||||
|
Loading…
Reference in New Issue
Block a user