Skip to content

Commit fc372b2

Browse files
rempack-brexxar-tc
andauthored
[rmkit] single-header fixes (#234)
* fix some stbtext extern fields * fix static framebuffer singleton --------- Co-authored-by: Brant Martin <[email protected]>
1 parent 2c4a341 commit fc372b2

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/rmkit/fb/fb.cpy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1014,7 +1014,7 @@ namespace framebuffer:
10141014
return um
10151015

10161016

1017-
static shared_ptr<FB> _FB
1017+
extern shared_ptr<FB> _FB = nullptr
10181018

10191019
// function: framebuffer::get
10201020
// this function returns the app's framebuffer

src/rmkit/fb/stb_text.cpy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
#define FONT_BUFFER_SIZE 24<<20
2121
namespace stbtext:
2222
// TODO: fix the max size read to prevent overflows (or just abort on really large files)
23-
static unsigned char font_buffer[FONT_BUFFER_SIZE]
24-
static stbtt_fontinfo font;
23+
extern unsigned char font_buffer[FONT_BUFFER_SIZE] = {}
24+
extern stbtt_fontinfo font = {}
2525
extern bool did_setup = false
2626
extern bool GRAYSCALE = false
2727

0 commit comments

Comments
 (0)