decord/source/modules/game_console/GameConsoleStore.tsx
github-actions e510164e6b chore: update source for alpha 346.2
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4759.js (118.4 MB)
2026-09-10 05:38:07 +00:00

98 lines
3.2 KiB
TypeScript

// Module ID: 4591
// Function ID: 4592
// Name: GameConsoleStore
// Dependencies: [4592, 4593, 504, 573, 2]
// Module 4591 (GameConsoleStore)
import initializeDefault from "initialize" /* 504 */;
import DispatcherDefault from "Dispatcher" /* 573 */;
import SessionsStore from "SessionsStore" /* 4592 */;
import VoiceStateStore from "VoiceStateStore" /* 4593 */;
let c2 = null;
let obj = null;
const set = new Set();
const dependencyMap = {};
const set1 = new Set();
let closure_8 = Object.freeze({});
const DeviceSettingsStore = initializeDefault.DeviceSettingsStore;
class GameConsoleStore extends DeviceSettingsStore {
}
const prototype = GameConsoleStore.prototype;
prototype["initialize"] = function initialize(lastSelectedDeviceByPlatform) {
this.waitFor(SessionsStore, VoiceStateStore);
};
prototype["getUserAgnosticState"] = function getUserAgnosticState() {
return { lastSelectedDeviceByPlatform: obj2 };
};
prototype["getDevicesForPlatform"] = function getDevicesForPlatform(arg0) {
let tmp = dependencyMap[arg0];
if (tmp == null) {
tmp = closure_8;
}
return tmp;
};
prototype["getLastSelectedDeviceByPlatform"] = function getLastSelectedDeviceByPlatform(arg0) {
return obj2[arg0];
};
prototype["getDevice"] = function getDevice(arg0, arg1) {
let tmp2;
if (dependencyMap[arg0] != null) {
tmp2 = tmp[arg1];
}
return tmp2;
};
prototype["getFetchingDevices"] = function getFetchingDevices(arg0) {
return set1.has(arg0);
};
prototype["getPendingDeviceCommands"] = function getPendingDeviceCommands() {
return set;
};
prototype["getRemoteSessionId"] = function getRemoteSessionId() {
return c2;
};
prototype["getAwaitingRemoteSessionInfo"] = function getAwaitingRemoteSessionInfo() {
return obj;
};
GameConsoleStore.displayName = "GameConsoleStore";
GameConsoleStore.persistKey = "GameConsoleStore";
obj = {
REMOTE_SESSION_CONNECT: function handleRemoteSessionConnect(sessionId) {
sessionId = sessionId.sessionId;
},
REMOTE_SESSION_DISCONNECT: function handleRemoteSessionDisconnect() {
c2 = null;
},
WAIT_FOR_REMOTE_SESSION: function handleWaitForRemoteSession(sessionType) {
obj = { type: sessionType.sessionType, nonce: sessionType.nonce, channelId: sessionType.channelId, startedAt: Date.now(), deviceId, commandId };
({ deviceId, commandId } = sessionType);
},
GAME_CONSOLE_FETCH_DEVICES_START: function handleFetchDevicesStart(platform) {
set1.add(platform.platform);
},
GAME_CONSOLE_FETCH_DEVICES_SUCCESS: function handleFetchDevicesSuccess(arg0) {
({ platform, devices } = arg0);
set1.delete(platform);
obj = {};
closure_5[platform] = obj;
obj2 = {};
for (const item10014 of devices) {
obj[item10014.id] = item10014;
if (obj2[platform] === item10014.id) {
obj2[platform] = tmp2.id;
}
continue;
}
},
GAME_CONSOLE_FETCH_DEVICES_FAIL: function handleFetchDevicesFail(platform) {
set1.delete(platform.platform);
},
GAME_CONSOLE_SELECT_DEVICE: function handleSelectDevice(platform) {
obj2[platform.platform] = platform.deviceId;
}
};
const gameConsoleStore = new GameConsoleStore(DispatcherDefault, obj);
const size = fn(2);
const result = size.fileFinishedImporting("modules/game_console/GameConsoleStore.tsx");
export default gameConsoleStore;