mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2026-05-09 04:13:28 -05:00
Create a new NetplaySession each time we try to join a netplay game. Hold onto it in NetplayManager so its available to the different activities that need to access it. Close the session when backing out of the netplay UI. Some guardrails in case things go out of sync: creating a session closes the old one if it is still around for some reason, finalizer in NetplaySession to release native resources if not closed explicitly for some reason. Profiling done to ensure all kotlin and native objects are successfully cleared / garbage collected.
150 lines
4.0 KiB
C++
150 lines
4.0 KiB
C++
// Copyright 2018 Dolphin Emulator Project
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
#pragma once
|
|
|
|
#include <jni.h>
|
|
|
|
namespace IDCache
|
|
{
|
|
JNIEnv* GetEnvForThread();
|
|
|
|
jclass GetStringClass();
|
|
|
|
jclass GetNativeLibraryClass();
|
|
jmethodID GetDisplayToastMsg();
|
|
jmethodID GetDisplayAlertMsg();
|
|
jmethodID GetUpdateTouchPointer();
|
|
jmethodID GetOnTitleChanged();
|
|
jmethodID GetFinishEmulationActivity();
|
|
|
|
jclass GetAnalyticsClass();
|
|
jmethodID GetAnalyticsValue();
|
|
|
|
jclass GetGameFileClass();
|
|
jfieldID GetGameFilePointer();
|
|
jmethodID GetGameFileConstructor();
|
|
|
|
jclass GetGameFileCacheClass();
|
|
jfieldID GetGameFileCachePointer();
|
|
|
|
jclass GetGameFileCacheManagerClass();
|
|
jfieldID GetGameFileCacheManagerInstance();
|
|
|
|
jclass GetNetplayClass();
|
|
jfieldID GetNetPlayUICallbacksPointer();
|
|
jfieldID GetNetPlayClientPointer();
|
|
jmethodID GetNetplayOnBootGame();
|
|
jmethodID GetNetplayOnStopGame();
|
|
jmethodID GetNetplayOnConnectionLost();
|
|
jmethodID GetNetplayOnConnectionError();
|
|
jmethodID GetNetplayOnGameChanged();
|
|
jmethodID GetNetplayOnHostInputAuthorityChanged();
|
|
jmethodID GetNetplayOnPadBufferChanged();
|
|
jmethodID GetNetplayOnChatMessageReceived();
|
|
jmethodID GetNetplayUpdate();
|
|
jmethodID GetNetplayOnShowChunkedProgressDialog();
|
|
jmethodID GetNetplayOnSetChunkedProgress();
|
|
jmethodID GetNetplayOnHideChunkedProgressDialog();
|
|
|
|
jclass GetNetplayPlayerClass();
|
|
jmethodID GetNetplayPlayerConstructor();
|
|
|
|
jclass GetPairClass();
|
|
jmethodID GetPairConstructor();
|
|
|
|
jclass GetHashMapClass();
|
|
jmethodID GetHashMapInit();
|
|
jmethodID GetHashMapPut();
|
|
|
|
jclass GetCompressCallbackClass();
|
|
jmethodID GetCompressCallbackRun();
|
|
|
|
jclass GetContentHandlerClass();
|
|
jmethodID GetContentHandlerOpenFd();
|
|
jmethodID GetContentHandlerDelete();
|
|
jmethodID GetContentHandlerGetSizeAndIsDirectory();
|
|
jmethodID GetContentHandlerGetDisplayName();
|
|
jmethodID GetContentHandlerGetChildNames();
|
|
jmethodID GetContentHandlerDoFileSearch();
|
|
|
|
jclass GetNetworkHelperClass();
|
|
jmethodID GetNetworkHelperGetNetworkIpAddress();
|
|
jmethodID GetNetworkHelperGetNetworkPrefixLength();
|
|
jmethodID GetNetworkHelperGetNetworkGateway();
|
|
|
|
jmethodID GetBooleanSupplierGet();
|
|
|
|
jclass GetARCheatClass();
|
|
jfieldID GetARCheatPointer();
|
|
jmethodID GetARCheatConstructor();
|
|
|
|
jclass GetGeckoCheatClass();
|
|
jfieldID GetGeckoCheatPointer();
|
|
jmethodID GetGeckoCheatConstructor();
|
|
|
|
jclass GetPatchCheatClass();
|
|
jfieldID GetPatchCheatPointer();
|
|
jmethodID GetPatchCheatConstructor();
|
|
|
|
jclass GetGraphicsModGroupClass();
|
|
jfieldID GetGraphicsModGroupPointer();
|
|
jmethodID GetGraphicsModGroupConstructor();
|
|
|
|
jclass GetGraphicsModClass();
|
|
jfieldID GetGraphicsModPointer();
|
|
jmethodID GetGraphicsModConstructor();
|
|
|
|
jclass GetRiivolutionPatchesClass();
|
|
jfieldID GetRiivolutionPatchesPointer();
|
|
|
|
jclass GetWiiUpdateCallbackClass();
|
|
jmethodID GetWiiUpdateCallbackFunction();
|
|
|
|
jclass GetControlClass();
|
|
jfieldID GetControlPointer();
|
|
jmethodID GetControlConstructor();
|
|
|
|
jclass GetControlGroupClass();
|
|
jfieldID GetControlGroupPointer();
|
|
jmethodID GetControlGroupConstructor();
|
|
|
|
jclass GetControlReferenceClass();
|
|
jfieldID GetControlReferencePointer();
|
|
jmethodID GetControlReferenceConstructor();
|
|
|
|
jclass GetControlGroupContainerClass();
|
|
jfieldID GetControlGroupContainerPointer();
|
|
jmethodID GetControlGroupContainerConstructor();
|
|
|
|
jclass GetEmulatedControllerClass();
|
|
jfieldID GetEmulatedControllerPointer();
|
|
jmethodID GetEmulatedControllerConstructor();
|
|
|
|
jclass GetNumericSettingClass();
|
|
jfieldID GetNumericSettingPointer();
|
|
jmethodID GetNumericSettingConstructor();
|
|
|
|
jclass GetCoreDeviceClass();
|
|
jfieldID GetCoreDevicePointer();
|
|
jmethodID GetCoreDeviceConstructor();
|
|
|
|
jclass GetCoreDeviceControlClass();
|
|
jfieldID GetCoreDeviceControlPointer();
|
|
jmethodID GetCoreDeviceControlConstructor();
|
|
|
|
jclass GetInputDetectorClass();
|
|
jfieldID GetInputDetectorPointer();
|
|
|
|
jclass GetPermissionHandlerClass();
|
|
jmethodID GetPermissionHandlerHasRecordAudioPermission();
|
|
jmethodID GetPermissionHandlerRequestRecordAudioPermission();
|
|
|
|
jmethodID GetRunnableRun();
|
|
|
|
jclass GetAudioUtilsClass();
|
|
jmethodID GetAudioUtilsGetSampleRate();
|
|
jmethodID GetAudioUtilsGetFramesPerBuffer();
|
|
|
|
} // namespace IDCache
|