mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2024-12-29 11:06:07 +00:00
print git info to log as well
This commit is contained in:
parent
62e501f31f
commit
bd48e24c32
|
@ -16,6 +16,7 @@ Files: CMakeSettings.json
|
|||
documents/Screenshots/We are DOOMED.png
|
||||
externals/stb_image.h
|
||||
externals/tracy/*
|
||||
externals/cmake-modules/*
|
||||
scripts/ps4_names.txt
|
||||
src/images/controller_icon.png
|
||||
src/images/exit_icon.png
|
||||
|
|
|
@ -9,5 +9,6 @@
|
|||
namespace Common {
|
||||
|
||||
constexpr char VERSION[] = "0.1.1 WIP";
|
||||
constexpr bool isRelease = false;
|
||||
|
||||
} // namespace Common
|
||||
|
|
|
@ -26,8 +26,8 @@
|
|||
#include "core/linker.h"
|
||||
#include "core/memory.h"
|
||||
#include "emulator.h"
|
||||
#include "video_core/renderdoc.h"
|
||||
#include "src/common/scm_rev.h"
|
||||
#include "video_core/renderdoc.h"
|
||||
|
||||
Frontend::WindowSDL* g_window = nullptr;
|
||||
|
||||
|
@ -50,6 +50,9 @@ Emulator::Emulator() {
|
|||
Common::Log::Initialize();
|
||||
Common::Log::Start();
|
||||
LOG_INFO(Loader, "Starting shadps4 emulator v{} ", Common::VERSION);
|
||||
LOG_INFO(Loader, "Revision {}", Common::g_scm_rev);
|
||||
LOG_INFO(Loader, "Branch {}", Common::g_scm_branch);
|
||||
LOG_INFO(Loader, "Description {}", Common::g_scm_desc);
|
||||
|
||||
// Defer until after logging is initialized.
|
||||
memory = Core::Memory::Instance();
|
||||
|
@ -103,7 +106,13 @@ void Emulator::Run(const std::filesystem::path& file) {
|
|||
}
|
||||
|
||||
std::string game_title = fmt::format("{} - {} <{}>", id, title, app_version);
|
||||
const std::string window_title = fmt::format("shadPS4 v{} {}| {}", Common::VERSION, Common::g_scm_desc,game_title);
|
||||
std::string window_title = "";
|
||||
if (Common::isRelease) {
|
||||
window_title = fmt::format("shadPS4 v{} | {}", Common::VERSION, game_title);
|
||||
} else {
|
||||
window_title =
|
||||
fmt::format("shadPS4 v{} {} | {}", Common::VERSION, Common::g_scm_desc, game_title);
|
||||
}
|
||||
window =
|
||||
std::make_unique<Frontend::WindowSDL>(WindowWidth, WindowHeight, controller, window_title);
|
||||
|
||||
|
|
|
@ -28,7 +28,8 @@ WindowSDL::WindowSDL(s32 width_, s32 height_, Input::GameController* controller_
|
|||
SDL_InitSubSystem(SDL_INIT_AUDIO);
|
||||
|
||||
SDL_PropertiesID props = SDL_CreateProperties();
|
||||
SDL_SetStringProperty(props, SDL_PROP_WINDOW_CREATE_TITLE_STRING, std::string(window_title).c_str());
|
||||
SDL_SetStringProperty(props, SDL_PROP_WINDOW_CREATE_TITLE_STRING,
|
||||
std::string(window_title).c_str());
|
||||
SDL_SetNumberProperty(props, SDL_PROP_WINDOW_CREATE_X_NUMBER, SDL_WINDOWPOS_CENTERED);
|
||||
SDL_SetNumberProperty(props, SDL_PROP_WINDOW_CREATE_Y_NUMBER, SDL_WINDOWPOS_CENTERED);
|
||||
SDL_SetNumberProperty(props, SDL_PROP_WINDOW_CREATE_WIDTH_NUMBER, width);
|
||||
|
|
Loading…
Reference in a new issue