Skip to content

Commit 53c8146

Browse files
committed
Updated json.hpp and d3dx12.h; also fixed argv parser
1 parent 84c39f6 commit 53c8146

File tree

7 files changed

+19380
-7612
lines changed

7 files changed

+19380
-7612
lines changed

MiniEngine/Core/GameCore.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
#include "CommandContext.h"
2121
#include "PostEffects.h"
2222
#include "Display.h"
23+
#include "Util/CommandLineArg.h"
24+
#include <shellapi.h>
2325

2426
namespace GameCore
2527
{
@@ -29,6 +31,10 @@ namespace GameCore
2931

3032
void InitializeApplication( IGameApp& game )
3133
{
34+
int argc = 0;
35+
LPWSTR* argv = CommandLineToArgvW(GetCommandLineW(), &argc);
36+
CommandLineArgs::Initialize(argc, argv);
37+
3238
Graphics::Initialize();
3339
SystemTime::Initialize();
3440
GameInput::Initialize();

MiniEngine/Core/Util/CommandLineArg.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ namespace CommandLineArgs
2424
void GatherArgs(size_t numArgs, const GetStringFunc& pfnGet)
2525
{
2626
// the first arg is always the exe name and we are looing for key/value pairs
27-
if (numArgs > 2)
27+
if (numArgs > 1)
2828
{
29-
size_t i = 1;
29+
size_t i = 0;
3030

3131
while (i < numArgs)
3232
{

0 commit comments

Comments
 (0)