mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Changed SkipSizeCheck and ExtraCRC to not require enabling sfall debugging mode.
This commit is contained in:
+3
-1
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user