Changed SkipSizeCheck and ExtraCRC to not require enabling sfall debugging mode.

This commit is contained in:
NovaRain
2017-03-16 22:52:58 +08:00
parent 0b739b7d77
commit fc99baa0c6
2 changed files with 12 additions and 12 deletions
+3 -1
View File
@@ -1,5 +1,5 @@
;sfall configuration settings
;v3.8.3
;v4.0
[Main]
;Change to 1 if you want to use command line args to tell sfall to use another ini file.
@@ -592,10 +592,12 @@ DebugMode=0
SkipCompatModeCheck=0
;Set to 1 to skip the executable file size check
;Does not require enabling sfall debugging mode
SkipSizeCheck=0
;If you're testing changes to the Fallout exe, you can override the CRC that sfall looks for here
;You can use several hex values, separated by commas
;Does not require enabling sfall debugging mode
;ExtraCRC=0x00000000,0x00000000
;Set to 1 to stop Fallout from deleting non readonly protos at startup
+1 -3
View File
@@ -83,7 +83,7 @@ void CRC(const char* filepath) {
DWORD size = GetFileSize(h, 0), crc;
bool sizeMatch = (size == ExpectedSize);
if (isDebug && !sizeMatch && GetPrivateProfileIntA("Debugging", "SkipSizeCheck", 0, ::sfall::ddrawIni)) {
if (!sizeMatch && GetPrivateProfileIntA("Debugging", "SkipSizeCheck", 0, ::sfall::ddrawIni)) {
sizeMatch = true;
}
@@ -97,7 +97,6 @@ void CRC(const char* filepath) {
bool matchedCRC = false;
if (isDebug) {
auto extraCrcList = GetIniList("Debugging", "ExtraCRC", "", 512, ',', ::sfall::ddrawIni);
if (extraCrcList.size() > 0) {
matchedCRC = std::any_of(extraCrcList.begin(), extraCrcList.end(), [crc](const std::string& testCrcStr) {
@@ -105,7 +104,6 @@ void CRC(const char* filepath) {
return testedCrc && crc == testedCrc;
});
}
}
for (int i = 0; i < sizeof(ExpectedCRC) / 4; i++) {
if (crc == ExpectedCRC[i]) matchedCRC = true;