mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-26 15:53:35 +01:00
Headless: Default to PNG for ppdmp tests.
This commit is contained in:
1 parent
70d92139db
commit
c84cbdda8a
1 file changed
+16
-6
+16
-6
@@ -187,14 +187,24 @@ protected:
|
||||
std::ifstream &in_;
|
||||
};
|
||||
|
||||
std::string ExpectedFromFilename(const std::string &bootFilename)
|
||||
{
|
||||
return bootFilename.substr(0, bootFilename.length() - 4) + ".expected";
|
||||
std::string ExpectedFromFilename(const std::string &bootFilename) {
|
||||
size_t pos = bootFilename.find_last_of('.');
|
||||
if (pos == bootFilename.npos) {
|
||||
return bootFilename + ".expected";
|
||||
}
|
||||
return bootFilename.substr(0, pos) + ".expected";
|
||||
}
|
||||
|
||||
std::string ExpectedScreenshotFromFilename(const std::string &bootFilename)
|
||||
{
|
||||
return bootFilename.substr(0, bootFilename.length() - 4) + ".expected.bmp";
|
||||
std::string ExpectedScreenshotFromFilename(const std::string &bootFilename) {
|
||||
size_t pos = bootFilename.find_last_of('.');
|
||||
if (pos == bootFilename.npos) {
|
||||
return bootFilename + ".bmp";
|
||||
}
|
||||
// Let's use pngs as the default for ppdmp tests.
|
||||
if (bootFilename.substr(pos) == ".ppdmp") {
|
||||
return bootFilename.substr(0, pos) + ".png";
|
||||
}
|
||||
return bootFilename.substr(0, pos) + ".expected.bmp";
|
||||
}
|
||||
|
||||
static std::string ChopFront(std::string s, std::string front)
|
||||
|
||||
Reference in new issue
Block a user