diff --git a/src/driver.h b/src/driver.h index 51334c9ca..207676f0d 100644 --- a/src/driver.h +++ b/src/driver.h @@ -367,7 +367,11 @@ bool FCEU_IsValidUI(EFCEUI ui); #ifdef __cplusplus extern "C" +{ +#endif + FILE *FCEUI_UTF8fopen_C(const char *n, const char *m); +#ifdef __cplusplus +} // extern C #endif -FILE *FCEUI_UTF8fopen_C(const char *n, const char *m); #endif //__DRIVER_H_ diff --git a/src/drivers/Qt/HelpPages.cpp b/src/drivers/Qt/HelpPages.cpp index 12150cd00..59d0a5ca2 100644 --- a/src/drivers/Qt/HelpPages.cpp +++ b/src/drivers/Qt/HelpPages.cpp @@ -96,7 +96,7 @@ void consoleWin_t::OpenHelpWindow(QString subpage) helpWin = HtmlHelpA( HWND(winId()), helpFileName.toLocal8Bit().constData(), HH_DISPLAY_TOPIC, (DWORD)NULL); if ( helpWin == NULL ) { - printf("Error: Failed to open help file '%s'\n", helpFileName.c_str() ); + printf("Error: Failed to open help file '%s'\n", helpFileName.toLocal8Bit().constData() ); } #else if ( helpWin > 0 ) diff --git a/src/fceu.cpp b/src/fceu.cpp index a44fed7d8..06bc5d604 100644 --- a/src/fceu.cpp +++ b/src/fceu.cpp @@ -274,9 +274,13 @@ int AutosaveFrequency = 256; // Number of frames between autosaves int EnableAutosave = 0; ///a wrapper for unzip.c -extern "C" FILE *FCEUI_UTF8fopen_C(const char *n, const char *m) { - return ::FCEUD_UTF8fopen(n, m); -} +extern "C" +{ + FILE *FCEUI_UTF8fopen_C(const char *n, const char *m) + { + return ::FCEUD_UTF8fopen(n, m); + } +} // extern C static DECLFW(BNull) { }