jak-project/common/versions.cpp
sardap 5777b6e058
Added screenshot hotkey (#1776)
* Added screenshot hotkey and added a toggle to debug GUI to disable screenshot hotkey (#1765)

* Renamed gfx_dumps folder to screenshots and screenshots taken with hotkey now use game render options not debug gui screenshot render options (#1765)

* Updated get current timestamp to use strftime

* fixed clang formating errors for screenshot hotkey

Co-authored-by: sardap <sardap@users.noreply.github.com>
2022-08-23 19:13:26 -04:00

31 lines
709 B
C++

#include "versions.h"
#include "common/util/Assert.h"
#include "third-party/fmt/core.h"
GameVersion game_name_to_version(const std::string& name) {
if (name == "jak1") {
return GameVersion::Jak1;
} else if (name == "jak2") {
return GameVersion::Jak2;
} else {
ASSERT_MSG(false, fmt::format("invalid game name: {}", name));
}
}
bool valid_game_version(const std::string& name) {
return name == "jak1" || name == "jak2";
}
std::string version_to_game_name(GameVersion v) {
switch (v) {
case GameVersion::Jak1:
return "jak1";
case GameVersion::Jak2:
return "jak2";
default:
ASSERT_MSG(false, fmt::format("no game_name for version: {} found", v));
}
}