-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #99 from FrederoxDev/new-launcher-paths
New launcher paths
- Loading branch information
Showing
15 changed files
with
82 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,6 @@ class Config { | |
bool promptDebugger; | ||
|
||
public: | ||
Config(); | ||
Config() = default; | ||
Config(std::string& text); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,34 @@ | ||
#include "amethyst/Log.hpp" | ||
|
||
namespace Log { | ||
FILE* fp; | ||
FILE* fp; | ||
|
||
void InitializeConsole() | ||
{ | ||
// Initialize console with stdout/stderr | ||
AllocConsole(); | ||
freopen_s(&fp, "CONOUT$", "w", stdout); | ||
freopen_s(&fp, "CONOUT$", "w", stderr); | ||
void InitializeConsole() | ||
{ | ||
// Initialize console with stdout/stderr | ||
AllocConsole(); | ||
freopen_s(&fp, "CONOUT$", "w", stdout); | ||
freopen_s(&fp, "CONOUT$", "w", stderr); | ||
|
||
// Enable ANSI-Escape codes for colours | ||
HANDLE consoleHandle = GetStdHandle(STD_OUTPUT_HANDLE); | ||
DWORD consoleMode; | ||
// Enable ANSI-Escape codes for colours | ||
HANDLE consoleHandle = GetStdHandle(STD_OUTPUT_HANDLE); | ||
DWORD consoleMode; | ||
|
||
GetConsoleMode(consoleHandle, &consoleMode); | ||
consoleMode |= ENABLE_VIRTUAL_TERMINAL_PROCESSING; | ||
SetConsoleMode(consoleHandle, consoleMode); | ||
SetConsoleTitle("AmethystAPI"); | ||
} | ||
GetConsoleMode(consoleHandle, &consoleMode); | ||
consoleMode |= ENABLE_VIRTUAL_TERMINAL_PROCESSING; | ||
SetConsoleMode(consoleHandle, consoleMode); | ||
SetConsoleTitle("AmethystAPI"); | ||
} | ||
|
||
void DestroyConsole() | ||
{ | ||
fclose(fp); | ||
FreeConsole(); | ||
} | ||
void DestroyConsole() | ||
{ | ||
fclose(fp); | ||
FreeConsole(); | ||
} | ||
|
||
void HideConsole() | ||
{ | ||
HWND consoleWindow = GetConsoleWindow(); | ||
ShowWindow(consoleWindow, SW_HIDE); | ||
} | ||
} // namespace Log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,25 @@ | ||
#pragma once | ||
#include <string> | ||
#include <filesystem> | ||
#include <winrt/Windows.Storage.h> | ||
#include <winrt/base.h> | ||
#include <shlobj_core.h> | ||
#include "windows.h" | ||
|
||
namespace fs = std::filesystem; | ||
using namespace winrt; | ||
using namespace Windows::Storage; | ||
|
||
/* | ||
Returns a path to Microsoft.MinecraftUWP_8wekyb3d8bbwe/LocalState/games/com.mojang | ||
*/ | ||
fs::path GetComMojangPath(); | ||
|
||
/* | ||
Returns a path to com.mojang/amethyst | ||
*/ | ||
fs::path GetAmethystFolder(); | ||
|
||
/** | ||
* Returns the path to the amethyst UWP folder | ||
*/ | ||
std::string GetAmethystFolder(); | ||
|
||
std::string StringFromWstring(std::wstring wstring); | ||
std::wstring WstringFromString(std::string string); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters