mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-07 06:56:04 +02:00
IPC Fixes (#1415)
* fix chatbox issues * fix ipc issues * add Ipc debug
This commit is contained in:
+22
-5
@@ -422,16 +422,19 @@ export const useVrcxStore = defineStore('Vrcx', () => {
|
||||
console.log(`IPC invalid JSON, ${json}`);
|
||||
return;
|
||||
}
|
||||
|
||||
switch (data.type) {
|
||||
case 'OnEvent':
|
||||
if (!gameStore.isGameRunning) {
|
||||
console.log('Game closed, skipped event', data);
|
||||
return;
|
||||
}
|
||||
if (AppDebug.debugPhotonLogging) {
|
||||
if (AppDebug.debugPhotonLogging || AppDebug.debugIPC) {
|
||||
console.log(
|
||||
'OnEvent',
|
||||
data.OnEventData.Code,
|
||||
'Param[254]:',
|
||||
data.OnEventData.Parameters?.[254],
|
||||
data.OnEventData
|
||||
);
|
||||
}
|
||||
@@ -443,10 +446,12 @@ export const useVrcxStore = defineStore('Vrcx', () => {
|
||||
console.log('Game closed, skipped event', data);
|
||||
return;
|
||||
}
|
||||
if (AppDebug.debugPhotonLogging) {
|
||||
if (AppDebug.debugPhotonLogging || AppDebug.debugIPC) {
|
||||
console.log(
|
||||
'OnOperationResponse',
|
||||
data.OnOperationResponseData.OperationCode,
|
||||
'Param[254]:',
|
||||
data.OnOperationResponseData.Parameters?.[254],
|
||||
data.OnOperationResponseData
|
||||
);
|
||||
}
|
||||
@@ -461,7 +466,7 @@ export const useVrcxStore = defineStore('Vrcx', () => {
|
||||
console.log('Game closed, skipped event', data);
|
||||
return;
|
||||
}
|
||||
if (AppDebug.debugPhotonLogging) {
|
||||
if (AppDebug.debugPhotonLogging || AppDebug.debugIPC) {
|
||||
console.log(
|
||||
'OnOperationRequest',
|
||||
data.OnOperationRequestData.OperationCode,
|
||||
@@ -474,10 +479,16 @@ export const useVrcxStore = defineStore('Vrcx', () => {
|
||||
console.log('Game closed, skipped event', data);
|
||||
return;
|
||||
}
|
||||
if (AppDebug.debugIPC) {
|
||||
console.log('VRCEvent:', data);
|
||||
}
|
||||
photonStore.parseVRCEvent(data);
|
||||
photonStore.photonEventPulse();
|
||||
break;
|
||||
case 'Event7List':
|
||||
if (AppDebug.debugIPC) {
|
||||
console.log('Event7List:', data);
|
||||
}
|
||||
photonStore.photonEvent7List.clear();
|
||||
for (const [id, dt] of Object.entries(data.Event7List)) {
|
||||
photonStore.photonEvent7List.set(parseInt(id, 10), dt);
|
||||
@@ -485,19 +496,25 @@ export const useVrcxStore = defineStore('Vrcx', () => {
|
||||
photonStore.photonLastEvent7List = Date.parse(data.dt);
|
||||
break;
|
||||
case 'VrcxMessage':
|
||||
if (AppDebug.debugPhotonLogging) {
|
||||
if (AppDebug.debugPhotonLogging || AppDebug.debugIPC) {
|
||||
console.log('VrcxMessage:', data);
|
||||
}
|
||||
eventVrcxMessage(data);
|
||||
break;
|
||||
case 'Ping':
|
||||
if (AppDebug.debugIPC) {
|
||||
console.log('IPC Ping');
|
||||
}
|
||||
if (!photonStore.photonLoggingEnabled) {
|
||||
photonStore.setPhotonLoggingEnabled();
|
||||
}
|
||||
ipcEnabled.value = true;
|
||||
updateLoopStore.ipcTimeout = 60; // 30secs
|
||||
updateLoopStore.ipcTimeout = 60; // 30 seconds
|
||||
break;
|
||||
case 'MsgPing':
|
||||
if (AppDebug.debugIPC) {
|
||||
console.log('MsgPing:', data);
|
||||
}
|
||||
state.externalNotifierVersion = data.version;
|
||||
break;
|
||||
case 'LaunchCommand':
|
||||
|
||||
Reference in New Issue
Block a user