Discord Rich Presence

This commit is contained in:
GabsPuNs
2026-04-19 03:03:52 -04:00
parent d318f40f1c
commit 6b54299695
16 changed files with 561 additions and 80 deletions

View File

@@ -51,6 +51,7 @@
#include "Network\WinsockNetLayer.h"
#include "Windows64_Xuid.h"
#include "Common/UI/UI.h"
#include "Windows64_DiscordPresence.h"
// Forward-declare the internal Renderer class and its global instance from 4J_Render_PC_d.lib.
// C4JRender (RenderManager) is a stateless wrapper — all D3D state lives in InternalRenderManager.
@@ -780,7 +781,6 @@ void SeedEditBox()
g_hWnd, reinterpret_cast<DLGPROC>(DlgProc));
}
//---------------------------------------------------------------------------
LRESULT CALLBACK DlgProc(HWND hWndDlg, UINT Msg, WPARAM wParam, LPARAM lParam)
{
@@ -1325,6 +1325,7 @@ static Minecraft* InitialiseMinecraftRuntime()
app.InitGameSettings();
app.InitialiseTips();
g_DiscordPresence.Initialise();
return pMinecraft;
}
@@ -1732,6 +1733,8 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance,
ui.tick();
ui.render();
g_DiscordPresence.Tick();
pMinecraft->gameRenderer->ApplyGammaPostProcess();
#if 0
@@ -1975,8 +1978,10 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance,
Vec3::resetPool();
}
// Shutdown discord presence
g_DiscordPresence.Shutdown();
// Free resources, unregister custom classes, and exit.
// app.Uninit();
CleanupDevice();
return 0;
}