This commit is contained in:
2024-11-20 00:39:27 -05:00
parent d105acd14f
commit 9e4ada6897
4 changed files with 8 additions and 5 deletions

View File

@@ -76,7 +76,7 @@ extern "C" {
extern __declspec(dllexport) void loadConfigs();
extern __declspec(dllexport) GoSlice getConfigNames();
extern __declspec(dllexport) GoString getCode(GoString configName);
extern __declspec(dllexport) char* getCode(GoString configName);
extern __declspec(dllexport) GoUint64 getTimeRemaining(GoInt n);
extern __declspec(dllexport) GoUint64 getTimeRemainingMS(GoInt n);

View File

@@ -28,7 +28,8 @@ int draw() {
Paint_Clear(WHITE);
const char *confName = "default";
GoString confStr = {confName, strlen(confName)};
Paint_DrawString(5, 5, getCode(confStr).p, &Font24, WHITE, BLACK);
const char *code = getCode(confStr);
Paint_DrawString(5, 5, code, &Font24, WHITE, BLACK);
DEV_Delay_ms(5000);