Skip to content

Commit 46322ba

Browse files
committed
Added a getter for ApplicationCommandLineArgs in the Application
1 parent 2b30c2e commit 46322ba

3 files changed

Lines changed: 5 additions & 3 deletions

File tree

src/RealEngine/Core/Application.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ namespace RealEngine {
8282
bool OnWindowClose(WindowCloseEvent& e);
8383
bool OnWindowResize(WindowResizeEvent& e);
8484

85+
const ApplicationCommandLineArgs& GetCommandLineArgs() const { return m_Specification.CommandLineArgs; }
86+
8587
/**
8688
* @brief Gets the main application window.
8789
* @return Reference to the Window object.

src/RealEngine/Core/Project.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,14 @@ namespace RealEngine {
4242
s_ActiveProject->m_CurrentScene->Save();
4343
}
4444

45-
void Project::Load(const std::filesystem::path& filePath) {
45+
bool Project::Load(const std::filesystem::path& filePath) {
4646
RE_CORE_ASSERT(std::filesystem::is_regular_file(filePath), "Project file does not exist!");
4747

4848
s_ActiveProject = CreateRef<Project>();
4949
s_ActiveProject->m_ProjectPath = filePath.parent_path();
5050
s_ActiveProject->m_ProjectName = filePath.stem().string();
5151

52-
ProjectSerializer::Deserialize(s_ActiveProject, filePath);
52+
return ProjectSerializer::Deserialize(s_ActiveProject, filePath);
5353
}
5454

5555
void Project::Save(const std::string& projectName) {

src/RealEngine/Core/Project.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ namespace RealEngine {
4242
* Reads project metadata, restores the project path and name, and loads
4343
* the current scene and asset data.
4444
*/
45-
static void Load(const std::filesystem::path& filePath);
45+
static bool Load(const std::filesystem::path& filePath);
4646

4747
/**
4848
* @brief Saves the current project using its existing name and path.

0 commit comments

Comments
 (0)