mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
- SDK Launcher is now a proper GUI app (no longer defaults to terminal, but can of course still be used in the terminal). - Set uniform font on all controls (GetStockObject sometimes returns fonts that isn't currently supported on the UI layout causing text to clip; we don't show in other languages or character encodings so we should just default to Microsoft Sans Serif). - Make anchors uniform for all controls (resize not yet supported). - Don't attempt to send commands to game instances if command string is null or empty. - Clamp surface console list size to window size. - Remove surface console logger boilerplate (surface logging is now a dedicated function). - Use actual SDK logging system for console prints/warnings/errors. - Fixed bug where the use of a shared stack buffer caused truncated parts of the file name to end up in the command line text.
46 lines
1.2 KiB
C++
46 lines
1.2 KiB
C++
#pragma once
|
|
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
|
|
|
|
class CLauncher
|
|
{
|
|
public:
|
|
CLauncher()
|
|
{
|
|
m_pSurface = nullptr;
|
|
m_ProcessorAffinity = NULL;
|
|
m_svCurrentDir = fs::current_path().u8string();
|
|
}
|
|
~CLauncher()
|
|
{
|
|
}
|
|
|
|
void RunSurface();
|
|
|
|
void Init();
|
|
void Shutdown();
|
|
|
|
void AddLog(const LogType_t level, const char* szText);
|
|
|
|
int HandleCommandLine(int argc, char* argv[]);
|
|
int HandleInput();
|
|
|
|
bool CreateLaunchContext(eLaunchMode lMode, uint64_t nProcessorAffinity = NULL, const char* szCommandLine = nullptr, const char* szConfig = nullptr);
|
|
void SetupLaunchContext(const char* szConfig, const char* szGameDll, const char* szCommandLine);
|
|
bool LaunchProcess() const;
|
|
|
|
eLaunchMode BuildParameter(string& parameterList) { return m_pSurface->BuildParameter(parameterList); }
|
|
|
|
private:
|
|
CSurface* m_pSurface;
|
|
|
|
uint64_t m_ProcessorAffinity;
|
|
|
|
string m_svGameDll;
|
|
string m_svCmdLine;
|
|
string m_svCurrentDir;
|
|
};
|
|
|
|
BOOL CALLBACK EnumWindowsProc(HWND hwnd, LPARAM lParam);
|
|
|
|
extern CLauncher* SDKLauncher();
|