mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2026-08-12 12:22:27 -05:00
Add ability to choose game when hosting
Also fix bottom sheets so they survive rotation
This commit is contained in:
@@ -148,6 +148,21 @@ Java_org_dolphinemu_dolphinemu_features_netplay_NetplaySession_nativeHost(JNIEnv
|
||||
return reinterpret_cast<jlong>(server);
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL
|
||||
Java_org_dolphinemu_dolphinemu_features_netplay_NetplaySession_nativeChangeGame(JNIEnv* env,
|
||||
jobject obj,
|
||||
jobject jgame_file)
|
||||
{
|
||||
auto* server = GetServerPointer(env, obj);
|
||||
if (!server)
|
||||
return;
|
||||
|
||||
const auto& game_file = *reinterpret_cast<std::shared_ptr<const UICommon::GameFile>*>(
|
||||
env->GetLongField(jgame_file, IDCache::GetGameFilePointer()));
|
||||
|
||||
server->ChangeGame(game_file->GetSyncIdentifier(), game_file->GetLongName());
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL
|
||||
Java_org_dolphinemu_dolphinemu_features_netplay_NetplaySession_nativeStartGame(JNIEnv* env,
|
||||
jobject obj)
|
||||
|
||||
Reference in New Issue
Block a user