decord/source/modules/game_console/GameConsoleStore.tsx

108 lines
3.4 KiB
TypeScript
Raw Normal View History

2026-08-05 07:35:12 +00:00
// Module ID: 4269
// Function ID: 4270
2026-07-29 08:29:29 +00:00
// Name: set
2026-08-05 07:35:12 +00:00
// Dependencies: [4270, 4271, 589, 709, 2]
2026-07-23 10:11:24 +00:00
2026-08-05 07:35:12 +00:00
// Module 4269 (set)
2026-07-29 08:29:29 +00:00
import handleUpdate from "handleUpdate";
import updateVoiceState from "updateVoiceState";
import { DeviceSettingsStore } from "initialize";
import set from "initialize";
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
let c2 = null;
let c3 = null;
let set = new Set();
let closure_5 = {};
let closure_6 = {};
const set1 = new Set();
let closure_8 = Object.freeze({});
class GameConsoleStore extends DeviceSettingsStore {
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
const prototype = GameConsoleStore.prototype;
prototype["initialize"] = function initialize(lastSelectedDeviceByPlatform) {
if (null != lastSelectedDeviceByPlatform) {
let closure_6 = lastSelectedDeviceByPlatform.lastSelectedDeviceByPlatform;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
this.waitFor(handleUpdate, updateVoiceState);
};
prototype["getUserAgnosticState"] = function getUserAgnosticState() {
return { lastSelectedDeviceByPlatform: closure_6 };
};
prototype["getDevicesForPlatform"] = function getDevicesForPlatform(handleUpdate) {
let tmp = dependencyMap[handleUpdate];
if (tmp == null) {
tmp = closure_8;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return tmp;
};
prototype["getLastSelectedDeviceByPlatform"] = function getLastSelectedDeviceByPlatform(handleUpdate) {
return table[handleUpdate];
};
prototype["getDevice"] = function getDevice(arg0, arg1) {
let tmp2;
if (dependencyMap[arg0] != null) {
tmp2 = tmp[arg1];
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return tmp2;
};
prototype["getFetchingDevices"] = function getFetchingDevices(handleUpdate) {
return set1.has(handleUpdate);
};
prototype["getPendingDeviceCommands"] = function getPendingDeviceCommands() {
return set;
};
prototype["getRemoteSessionId"] = function getRemoteSessionId() {
return c2;
};
prototype["getAwaitingRemoteSessionInfo"] = function getAwaitingRemoteSessionInfo() {
return c3;
};
GameConsoleStore.displayName = "GameConsoleStore";
GameConsoleStore.persistKey = "GameConsoleStore";
const gameConsoleStore = new GameConsoleStore(require("dispatcher"), {
2026-07-20 16:05:17 +00:00
REMOTE_SESSION_CONNECT: function handleRemoteSessionConnect(sessionId) {
sessionId = sessionId.sessionId;
2026-07-29 08:29:29 +00:00
let c3 = null;
2026-07-20 16:05:17 +00:00
},
REMOTE_SESSION_DISCONNECT: function handleRemoteSessionDisconnect() {
2026-07-29 08:29:29 +00:00
let c2 = null;
let c3 = null;
2026-07-20 16:05:17 +00:00
},
WAIT_FOR_REMOTE_SESSION: function handleWaitForRemoteSession(sessionType) {
let commandId;
let deviceId;
2026-07-23 10:11:24 +00:00
const obj = { type: sessionType.sessionType, nonce: sessionType.nonce, channelId: sessionType.channelId, startedAt: Date.now(), deviceId, commandId };
2026-07-20 16:05:17 +00:00
({ deviceId, commandId } = sessionType);
},
GAME_CONSOLE_FETCH_DEVICES_START: function handleFetchDevicesStart(platform) {
set1.add(platform.platform);
},
2026-07-29 08:29:29 +00:00
GAME_CONSOLE_FETCH_DEVICES_SUCCESS: function handleFetchDevicesSuccess(arg0) {
let devices;
let platform;
({ platform, devices } = arg0);
2026-07-20 16:05:17 +00:00
set1.delete(platform);
let obj = {};
2026-07-29 08:29:29 +00:00
closure_5[platform] = obj;
2026-07-20 16:05:17 +00:00
obj = {};
2026-07-29 08:29:29 +00:00
for (const item10014 of devices) {
obj[item10014.id] = item10014;
let tmp3 = obj;
if (obj[platform] === item10014.id) {
let tmp4 = item10014;
obj[platform] = tmp2.id;
}
continue;
2026-07-20 16:05:17 +00:00
}
},
GAME_CONSOLE_FETCH_DEVICES_FAIL: function handleFetchDevicesFail(platform) {
set1.delete(platform.platform);
},
GAME_CONSOLE_SELECT_DEVICE: function handleSelectDevice(platform) {
2026-07-29 08:29:29 +00:00
closure_6[platform.platform] = platform.deviceId;
2026-07-20 16:05:17 +00:00
}
});
2026-07-29 08:29:29 +00:00
const result = set.fileFinishedImporting("modules/game_console/GameConsoleStore.tsx");
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export default gameConsoleStore;