diff options
Diffstat (limited to 'csgo-loader/csgo-client/Client.cpp')
| -rw-r--r-- | csgo-loader/csgo-client/Client.cpp | 39 |
1 files changed, 22 insertions, 17 deletions
diff --git a/csgo-loader/csgo-client/Client.cpp b/csgo-loader/csgo-client/Client.cpp index d2dbd7a..69920bb 100644 --- a/csgo-loader/csgo-client/Client.cpp +++ b/csgo-loader/csgo-client/Client.cpp @@ -9,19 +9,9 @@ #define SERVER_IP 0xE53CA523 // Hexadecimal representation of the server IP, obtained by inet_addr()
#define SERVER_PORT 0xF2C // Hexadecimal representation of the server port.
-int __stdcall WinMain(HINSTANCE inst, HINSTANCE prev, char* str, int cmdshow)
+#if 0
+void hhahahaha()
{
- AllocConsole();
- FILE *file;
- freopen_s(&file, "CONOUT$", "w", stdout);
-
- RemoteCode::RemoteProcess Process;
-
- if(!Syscalls->Start())
- ERROR_ASSERT("[000F:00001A00] Failed to initialize. Please contact an administrator.");
-
- UserInterface->m_Data.m_ExecutionState = UserExperience::EXECUTION_WAITING;
-
std::thread WindowThread([]
{
if(!UserInterface->Start())
@@ -30,11 +20,6 @@ int __stdcall WinMain(HINSTANCE inst, HINSTANCE prev, char* str, int cmdshow) UserInterface->RunUiFrame();
}); WindowThread.detach();
- Networking::TCPClient Client;
-
- if(!Client.Start(LOCAL_IP, SERVER_PORT))
- ERROR_ASSERT("[000F:0002A000] Server did not accept the connection.");
-
UserInterface->m_Data.m_ExecutionState = UserExperience::EXECUTION_LOG_IN;
while(UserInterface->m_Data.m_ExecutionState != UserExperience::EXECUTION_WAITING)
@@ -55,6 +40,26 @@ int __stdcall WinMain(HINSTANCE inst, HINSTANCE prev, char* str, int cmdshow) {
UserInterface->m_Data.m_ExecutionState = UserExperience::EXECUTION_CHOOSE;
}
+}
+#endif
+
+int __stdcall WinMain(HINSTANCE inst, HINSTANCE prev, char* str, int cmdshow)
+{
+#ifdef DEBUG
+ AllocConsole();
+ FILE *file;
+ freopen_s(&file, "CONOUT$", "w", stdout);
+#endif
+ Networking::TCPClient Client;
+
+ // Initialize the syscall manager.
+ if(!Syscalls->Start())
+ ERROR_ASSERT("[000F:00001A00] Failed to initialize. Please contact an administrator.");
+
+ UserInterface->m_Data.m_ExecutionState = UserExperience::EXECUTION_WAITING;
+
+ if(!Client.Start(LOCAL_IP, SERVER_PORT))
+ ERROR_ASSERT("[000F:0002A000] Server did not accept the connection.");
// TODO: Add game selection.
|
