MCPcopy Create free account
hub / github.com/XorTroll/uLaunch / LoadDefaultThemeFile

Function LoadDefaultThemeFile

projects/uDesigner/source/main.cpp:1374–1390  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1372}
1373
1374void LoadDefaultThemeFile() {
1375 auto f = fopen("assets/default-theme.ultheme", "rb");
1376 if(f) {
1377 fseek(f, 0, SEEK_END);
1378 const auto theme_data_size = ftell(f);
1379 rewind(f);
1380
1381 auto theme_data = malloc(theme_data_size);
1382 fread(theme_data, theme_data_size, 1, f);
1383 fclose(f);
1384
1385 cpp_LoadThemeFile(theme_data, theme_data_size);
1386 }
1387 else {
1388 ShowErrorFmt("Unable to open default theme ZIP...");
1389 }
1390}
1391
1392EM_JS(void, LoadThemeFile, (), {
1393 var input = document.createElement("input");

Callers 1

MainLoopFunction · 0.85

Calls 2

cpp_LoadThemeFileFunction · 0.85
ShowErrorFmtFunction · 0.85

Tested by

no test coverage detected