mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-07 06:56:04 +02:00
fix: Add HMD AFK state update flow and IPC bridge function
This commit is contained in:
+2
-1
@@ -23,7 +23,7 @@
|
|||||||
import { computed, onBeforeMount, onMounted } from 'vue';
|
import { computed, onBeforeMount, onMounted } from 'vue';
|
||||||
|
|
||||||
import { addGameLogEvent, getGameLogTable } from './coordinators/gameLogCoordinator';
|
import { addGameLogEvent, getGameLogTable } from './coordinators/gameLogCoordinator';
|
||||||
import { runCheckVRChatDebugLoggingFlow, runUpdateIsGameRunningFlow } from './coordinators/gameCoordinator';
|
import { runCheckVRChatDebugLoggingFlow, runUpdateIsGameRunningFlow, runUpdateIsHmdAfkFlow } from './coordinators/gameCoordinator';
|
||||||
import { Toaster } from './components/ui/sonner';
|
import { Toaster } from './components/ui/sonner';
|
||||||
import { TooltipProvider } from './components/ui/tooltip';
|
import { TooltipProvider } from './components/ui/tooltip';
|
||||||
import { createGlobalStores } from './stores';
|
import { createGlobalStores } from './stores';
|
||||||
@@ -53,6 +53,7 @@
|
|||||||
window.$pinia = store;
|
window.$pinia = store;
|
||||||
// Bridge: attach coordinator functions to store for C# IPC callbacks
|
// Bridge: attach coordinator functions to store for C# IPC callbacks
|
||||||
store.game.updateIsGameRunning = runUpdateIsGameRunningFlow;
|
store.game.updateIsGameRunning = runUpdateIsGameRunningFlow;
|
||||||
|
store.game.updateIsHmdAfk = runUpdateIsHmdAfkFlow;
|
||||||
store.gameLog.addGameLogEvent = addGameLogEvent;
|
store.gameLog.addGameLogEvent = addGameLogEvent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -97,6 +97,19 @@ export async function runUpdateIsGameRunningFlow(
|
|||||||
vrStore.updateOpenVR();
|
vrStore.updateOpenVR();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Orchestrates the HMD AFK state update from IPC.
|
||||||
|
* @param {boolean} isHmdAfkArg HMD AFK flag from VR polling.
|
||||||
|
*/
|
||||||
|
export function runUpdateIsHmdAfkFlow(isHmdAfkArg) {
|
||||||
|
const gameStore = useGameStore();
|
||||||
|
|
||||||
|
if (isHmdAfkArg !== gameStore.isHmdAfk) {
|
||||||
|
gameStore.setIsHmdAfk(isHmdAfkArg);
|
||||||
|
console.log('isHmdAfk', isHmdAfkArg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Runs auto cache management if enabled.
|
* Runs auto cache management if enabled.
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user