MCPcopy Create free account
hub / github.com/TASEmulators/fceux / LoadConfig

Function LoadConfig

src/drivers/win/config.cpp:491–530  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

489}
490
491void LoadConfig(const char *filename)
492{
493 FCEUI_GetNTSCTH(&ntsctint, &ntschue);
494
495 LoadFCEUConfig(filename, fceuconfig);
496
497 FCEUI_SetNTSCTH(ntsccol_enable, ntsctint, ntschue);
498
499 //adelikat:Hacky fix for Ram Watch recent menu
500 for (int x = 0; x < 5; x++)
501 {
502 if(ramWatchRecent[x])
503 {
504 strncpy(rw_recent_files[x], ramWatchRecent[x], 1024);
505 free(ramWatchRecent[x]);
506 ramWatchRecent[x] = 0;
507 }
508 else
509 {
510 rw_recent_files[x][0] = 0;
511 }
512 }
513
514 // Hacky fix for taseditor_config.last_author and rom_name_when_closing_emulator
515 if (taseditorConfigLastAuthorName)
516 {
517 strncpy(taseditorConfig.lastAuthorName, taseditorConfigLastAuthorName, AUTHOR_NAME_MAX_LEN - 1);
518 taseditorConfig.lastAuthorName[AUTHOR_NAME_MAX_LEN - 1] = 0;
519 } else
520 {
521 taseditorConfig.lastAuthorName[0] = 0;
522 }
523
524 if (ResumeROM)
525 strcpy(romNameWhenClosingEmulator, ResumeROM);
526 else
527 romNameWhenClosingEmulator[0] = 0;
528
529 //-----------------------------------
530}
531

Callers 1

mainFunction · 0.70

Calls 3

FCEUI_GetNTSCTHFunction · 0.85
LoadFCEUConfigFunction · 0.85
FCEUI_SetNTSCTHFunction · 0.85

Tested by

no test coverage detected