////////////////////////////////////////////////////////// // // GetExePatchRequirements // // Check which patches should be applied // ////////////////////////////////////////////////////////// SExePatchedStatus GetExePatchRequirements( void ) { SExePatchedStatus status; status.bTimestamp = GetApplicationSettingInt ( "aero-enabled" ) ? true : false; status.bLargeMem = true; status.bDep = true; status.bNvightmare = GetApplicationSettingInt( "nvhacks", "optimus-export-enablement" ) ? true : false; status.bAltModules = GetPatchRequirementAltModules(); return status; }
////////////////////////////////////////////////////////// // // ShouldUseExeCopy // // Returns true if patches should be applied to exe copy // ////////////////////////////////////////////////////////// bool ShouldUseExeCopy( void ) { int iUseCopy; if ( GetApplicationSettingInt( "nvhacks", "optimus" ) ) iUseCopy = GetApplicationSettingInt( "nvhacks", "optimus-rename-exe" ); else iUseCopy = GetApplicationSettingInt( "driver-overrides-disabled" ); if ( GetPatchRequirementAltModules() ) iUseCopy = 1; return iUseCopy != 0; }
////////////////////////////////////////////////////////// // // ShouldUseExeCopy // // Returns true if patches should be applied to exe copy // ////////////////////////////////////////////////////////// bool ShouldUseExeCopy( void ) { SString strUseCopyReason; if ( GetApplicationSettingInt( "nvhacks", "optimus" ) ) strUseCopyReason = GetApplicationSettingInt( "nvhacks", "optimus-rename-exe" ) == 0 ? "" : "optimus-rename-exe"; else strUseCopyReason = GetApplicationSettingInt( "driver-overrides-disabled" ) == 0 ? "" : "driver-overrides-disabled"; if ( GetPatchRequirementAltModules() ) strUseCopyReason += " AltModules"; if ( RequiresAltTabFix() ) strUseCopyReason += " AltTabFix"; // Log reason for using proxy_sa static SString strUseCopyReasonPrevious; if ( strUseCopyReasonPrevious != strUseCopyReason ) { WriteDebugEventAndReport( 3500, SString( "Using proxy_sa because: %s", *strUseCopyReason ) ); strUseCopyReasonPrevious = strUseCopyReason; } return !strUseCopyReason.empty(); }