X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=radiant%2Fpreferences.cpp;h=03486fd861b4abc81997dd36b48f88f59e3e7613;hb=a6e2bf8e2dd2b6feaa2c3f72735aa067d0085175;hp=9a71c25b95c7a474f08bc39547949d454af8b7de;hpb=7f2f9610badcb9170590bc9ac48875ef7b61a5ce;p=xonotic%2Fnetradiant.git diff --git a/radiant/preferences.cpp b/radiant/preferences.cpp index 9a71c25b..03486fd8 100644 --- a/radiant/preferences.cpp +++ b/radiant/preferences.cpp @@ -39,6 +39,13 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include "missing.h" #include "gtkmisc.h" +#ifdef _WIN32 + // sanity check - some gtk2 win32 runtimes replace sprintf + #if defined( sprintf ) + #error sprintf is a macro. are you sure? + #endif +#endif + #ifdef _WIN32 #include #define X_OK 0 @@ -2218,7 +2225,7 @@ void PrefsDlg::BuildDialog () #ifdef _WIN32 // win32 file dialog - check = gtk_check_button_new_with_label (_("Use win32 file load dialog")); + check = gtk_check_button_new_with_label (_("Use win32 file dialog (hacky)")); gtk_widget_show (check); // gtk_container_add (GTK_CONTAINER (vbox), check); gtk_box_pack_start(GTK_BOX(vbox), check, FALSE, FALSE, 0); @@ -3359,7 +3366,7 @@ void CGameInstall::BuildDialog() { void CGameInstall::Run() { ScanGames(); - if (m_availGames[0] == GAME_NONE) { + if ( m_availGames[0] == GAME_NONE ) { return; } if ( DoModal() == IDCANCEL ) { @@ -3375,8 +3382,8 @@ void CGameInstall::Run() { gameFilePath += ".game"; Sys_Printf( "game file: %s\n", gameFilePath.GetBuffer() ); - FILE *fg = fopen( gameFilePath.GetBuffer(), "w" ); - if ( fg == NULL || ferror( fg ) ) { + FILE * fg = fopen( gameFilePath.GetBuffer(), "w" ); + if ( fg == NULL ) { Error( "Failed to open %s for writing\n", gameFilePath.GetBuffer() ); } fprintf( fg, "\n