mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
MainAndroid: Remove s_filename
This fits better as a function parameter than as global state.
This commit is contained in:
@ -246,13 +246,6 @@ public final class NativeLibrary
|
||||
*/
|
||||
public static native void SetConfig(String configFile, String Section, String Key, String Value);
|
||||
|
||||
/**
|
||||
* Sets the filename to be run during emulation.
|
||||
*
|
||||
* @param filename The filename to be run during emulation.
|
||||
*/
|
||||
public static native void SetFilename(String filename);
|
||||
|
||||
/**
|
||||
* Gets the embedded banner within the given ISO/ROM.
|
||||
*
|
||||
@ -328,7 +321,7 @@ public final class NativeLibrary
|
||||
/**
|
||||
* Begins emulation.
|
||||
*/
|
||||
public static native void Run();
|
||||
public static native void Run(String path);
|
||||
|
||||
// Surface Handling
|
||||
public static native void SurfaceChanged(Surface surf);
|
||||
|
@ -66,9 +66,6 @@ public final class EmulationFragment extends Fragment implements SurfaceHolder.C
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
|
||||
{
|
||||
String path = getArguments().getString(ARGUMENT_GAME_PATH);
|
||||
NativeLibrary.SetFilename(path);
|
||||
|
||||
View contents = inflater.inflate(R.layout.fragment_emulation, container, false);
|
||||
|
||||
SurfaceView surfaceView = (SurfaceView) contents.findViewById(R.id.surface_emulation);
|
||||
@ -241,7 +238,8 @@ public final class EmulationFragment extends Fragment implements SurfaceHolder.C
|
||||
Log.info("[EmulationFragment] Starting emulation: " + mSurface);
|
||||
|
||||
// Start emulation using the provided Surface.
|
||||
NativeLibrary.Run();
|
||||
String path = getArguments().getString(ARGUMENT_GAME_PATH);
|
||||
NativeLibrary.Run(path);
|
||||
}
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user