I'm not really sure what the error is, switchbrew doesn't give much detail other than that one word. My guess is that it's failing to load the data-but I'm not sure what my problem is. I'm using the default makefile, and I'm loading the "default_font.bin" from libnx.
Here is the relevant code:
```
PrintConsole temp = {
//Font:
{
default_font_bin, //font gfx
0, //first ascii character in the set
256, //number of characters in the font set
16, //tile width
16, //tile height
},
NULL, //renderer
0,0, //cursorX cursorY
0,0, //prevcursorX prevcursorY
80, //console width
45, //console height
0, //window x
0, //window y
80, //window width
45, //window height
3, //tab size
0, // foreground color
7, // background color
0, // flags
false //console initialized
};
return temp;
```
as you see it is quite literally exactly the same as the default print console. I then try to use it like this with a copy of the return value of the function above (stored nice and safely in a class)
(example, not my actual code but essentially what it is. I have my reason for making a pointer as a variable and then passing it in).
pointer = *temp;
initConsole(pointer);
So my guess is either I've made some fundemental error with pointers like we all do sometimes (I'm a bit out of practice, I so rarely need to use them), or I don't know how to use the data folder with the makefile. Based on the code for libnx itself it seems I just need to drop the font (in this case default_font.bin) into the data folder and then #include "default_font_bin.h" in the program right? Not going to lie I have no idea how that is supposed to work, but it looks like what the library itself did.
edit: the asnwer was I'm an idiot, I had debug prints before I had initialised the console. duh.
Here is the relevant code:
```
PrintConsole temp = {
//Font:
{
default_font_bin, //font gfx
0, //first ascii character in the set
256, //number of characters in the font set
16, //tile width
16, //tile height
},
NULL, //renderer
0,0, //cursorX cursorY
0,0, //prevcursorX prevcursorY
80, //console width
45, //console height
0, //window x
0, //window y
80, //window width
45, //window height
3, //tab size
0, // foreground color
7, // background color
0, // flags
false //console initialized
};
return temp;
```
as you see it is quite literally exactly the same as the default print console. I then try to use it like this with a copy of the return value of the function above (stored nice and safely in a class)
(example, not my actual code but essentially what it is. I have my reason for making a pointer as a variable and then passing it in).
pointer = *temp;
initConsole(pointer);
So my guess is either I've made some fundemental error with pointers like we all do sometimes (I'm a bit out of practice, I so rarely need to use them), or I don't know how to use the data folder with the makefile. Based on the code for libnx itself it seems I just need to drop the font (in this case default_font.bin) into the data folder and then #include "default_font_bin.h" in the program right? Not going to lie I have no idea how that is supposed to work, but it looks like what the library itself did.
edit: the asnwer was I'm an idiot, I had debug prints before I had initialised the console. duh.
Last edited by noneuclideanmotion,