mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2026-07-26 00:45:35 +00:00
Codechange: make Subdirectory a scoped enum
This commit is contained in:
committed by
Peter Nelson
parent
93a6aa77c6
commit
5aae8e2d64
+3
-3
@@ -127,7 +127,7 @@ bool DriverFactoryBase::SelectDriverImpl(const std::string &name, Driver::Type t
|
||||
/* Check if we have already tried this driver in last run.
|
||||
* If it is here, it most likely means we crashed. So skip
|
||||
* hardware acceleration. */
|
||||
auto filename = FioFindFullPath(BASE_DIR, HWACCELERATION_TEST_FILE);
|
||||
auto filename = FioFindFullPath(Subdirectory::Base, HWACCELERATION_TEST_FILE);
|
||||
if (!filename.empty()) {
|
||||
FioRemove(filename);
|
||||
|
||||
@@ -140,7 +140,7 @@ bool DriverFactoryBase::SelectDriverImpl(const std::string &name, Driver::Type t
|
||||
}
|
||||
|
||||
/* Write empty file to note we are attempting hardware acceleration. */
|
||||
FioFOpenFile(HWACCELERATION_TEST_FILE, "w", BASE_DIR);
|
||||
FioFOpenFile(HWACCELERATION_TEST_FILE, "w", Subdirectory::Base);
|
||||
}
|
||||
|
||||
/* Keep old driver in case we need to switch back, or may still need to process an OS callback. */
|
||||
@@ -210,7 +210,7 @@ void DriverFactoryBase::MarkVideoDriverOperational()
|
||||
/* As part of the detection whether the GPU driver crashes the game,
|
||||
* and as we are operational now, remove the hardware acceleration
|
||||
* test-file. */
|
||||
auto filename = FioFindFullPath(BASE_DIR, HWACCELERATION_TEST_FILE);
|
||||
auto filename = FioFindFullPath(Subdirectory::Base, HWACCELERATION_TEST_FILE);
|
||||
if (!filename.empty()) FioRemove(filename);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user