diff options
| author | Loki Rautio <lokirautio@gmail.com> | 2026-03-07 21:12:22 -0600 |
|---|---|---|
| committer | Loki Rautio <lokirautio@gmail.com> | 2026-03-07 21:12:22 -0600 |
| commit | 087b7e7abfe81dd7f0fdcdea36ac9f245950df1a (patch) | |
| tree | 69454763e73ca764af4e682d3573080b13138a0e /Minecraft.Client/ConnectScreen.cpp | |
| parent | a9be52c41a02d207233199e98898fe7483d7e817 (diff) | |
Revert "Project modernization (#630)"
This code was not tested and breaks in Release builds, reverting to restore
functionality of the nightly. All in-game menus do not work and generating
a world crashes.
This reverts commit a9be52c41a02d207233199e98898fe7483d7e817.
Diffstat (limited to 'Minecraft.Client/ConnectScreen.cpp')
| -rw-r--r-- | Minecraft.Client/ConnectScreen.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Minecraft.Client/ConnectScreen.cpp b/Minecraft.Client/ConnectScreen.cpp index 18d50a52..2cf005b6 100644 --- a/Minecraft.Client/ConnectScreen.cpp +++ b/Minecraft.Client/ConnectScreen.cpp @@ -12,12 +12,12 @@ ConnectScreen::ConnectScreen(Minecraft *minecraft, const wstring& ip, int port) { aborted = false; // System.out.println("Connecting to " + ip + ", " + port); - minecraft->setLevel(nullptr); + minecraft->setLevel(NULL); #if 1 // 4J - removed from separate thread, but need to investigate what we actually need here connection = new ClientConnection(minecraft, ip, port); if (aborted) return; - connection->send(std::make_shared<PreLoginPacket>(minecraft->user->name)); + connection->send( shared_ptr<PreLoginPacket>( new PreLoginPacket(minecraft->user->name) ) ); #else new Thread() { @@ -45,7 +45,7 @@ ConnectScreen::ConnectScreen(Minecraft *minecraft, const wstring& ip, int port) void ConnectScreen::tick() { - if (connection != nullptr) + if (connection != NULL) { connection->tick(); } @@ -69,7 +69,7 @@ void ConnectScreen::buttonClicked(Button *button) if (button->id == 0) { aborted = true; - if (connection != nullptr) connection->close(); + if (connection != NULL) connection->close(); minecraft->setScreen(new TitleScreen()); } } @@ -80,7 +80,7 @@ void ConnectScreen::render(int xm, int ym, float a) Language *language = Language::getInstance(); - if (connection == nullptr) + if (connection == NULL) { drawCenteredString(font, language->getElement(L"connect.connecting"), width / 2, height / 2 - 50, 0xffffff); drawCenteredString(font, L"", width / 2, height / 2 - 10, 0xffffff); |
