SaveCommandMap( path.c_str() );
}
+void add_local_rc_files(){
+#define GARUX_DISABLE_GTKTHEME
+#ifndef GARUX_DISABLE_GTKTHEME
+/* FIXME: HACK: not GTK3 compatible
+ https://developer.gnome.org/gtk2/stable/gtk2-Resource-Files.html#gtk-rc-add-default-file
+ https://developer.gnome.org/gtk3/stable/gtk3-Resource-Files.html#gtk-rc-add-default-file
+ > gtk_rc_add_default_file has been deprecated since version 3.0 and should not be used in newly-written code.
+ > Use GtkStyleContext with a custom GtkStyleProvider instead
+*/
+
+ {
+ StringOutputStream path( 512 );
+ path << AppPath_get() << ".gtkrc-2.0.radiant";
+ gtk_rc_add_default_file( path.c_str() );
+ }
+#ifdef WIN32
+ {
+ StringOutputStream path( 512 );
+ path << AppPath_get() << ".gtkrc-2.0.win";
+ gtk_rc_add_default_file( path.c_str() );
+ }
+#endif
+#endif // GARUX_DISABLE_GTKTHEME
+}
+
int main( int argc, char* argv[] ){
crt_init();
if ( lib != 0 ) {
void ( WINAPI *qDwmEnableComposition )( bool bEnable ) = ( void (WINAPI *) ( bool bEnable ) )GetProcAddress( lib, "DwmEnableComposition" );
if ( qDwmEnableComposition ) {
+ bool Aero = false;
+ for ( int i = 1; i < argc; ++i ){
+ if ( !stricmp( argv[i], "-aero" ) ){
+ Aero = true;
+ qDwmEnableComposition( TRUE );
+ break;
+ }
+ }
// disable Aero
- qDwmEnableComposition( FALSE );
+ if ( !Aero ){
+ qDwmEnableComposition( FALSE );
+ }
}
FreeLibrary( lib );
}
+ _setmaxstdio(2048);
#endif
const char* mapname = NULL;
paths_init();
+ add_local_rc_files();
+
if ( !check_version() ) {
return EXIT_FAILURE;
}
hide_splash();
+#ifdef WIN32
+ if( openCmdMap && *openCmdMap ){
+ Map_LoadFile( openCmdMap );
+ }
+ else
+#endif // WIN32
if ( mapname != NULL ) {
Map_LoadFile( mapname );
}