mirror of
https://github.com/libretro/Mesen.git
synced 2024-12-12 11:25:38 +00:00
Linux: Fixed interop crash when trying to record a movie
This commit is contained in:
parent
4b40857779
commit
9e09c51e7c
@ -32,12 +32,13 @@ namespace Mesen.GUI.Forms
|
||||
{
|
||||
base.OnFormClosed(e);
|
||||
if(this.DialogResult == DialogResult.OK) {
|
||||
InteropEmu.MovieRecord(new RecordMovieOptions(
|
||||
RecordMovieOptions options = new RecordMovieOptions(
|
||||
this.txtFilename.Text,
|
||||
this.txtAuthor.Text,
|
||||
this.txtDescription.Text,
|
||||
this.cboRecordFrom.GetEnumValue<RecordMovieFrom>()
|
||||
));
|
||||
);
|
||||
InteropEmu.MovieRecord(ref options);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -98,7 +98,7 @@ namespace Mesen.GUI
|
||||
[DllImport(DLLPath, EntryPoint = "GetLog")] private static extern IntPtr GetLogWrapper();
|
||||
|
||||
[DllImport(DLLPath)] public static extern void MoviePlay([MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(UTF8Marshaler))]string filename);
|
||||
[DllImport(DLLPath)] public static extern void MovieRecord(RecordMovieOptions options);
|
||||
[DllImport(DLLPath)] public static extern void MovieRecord(ref RecordMovieOptions options);
|
||||
[DllImport(DLLPath)] public static extern void MovieStop();
|
||||
[DllImport(DLLPath)] [return: MarshalAs(UnmanagedType.I1)] public static extern bool MoviePlaying();
|
||||
[DllImport(DLLPath)] [return: MarshalAs(UnmanagedType.I1)] public static extern bool MovieRecording();
|
||||
|
@ -356,7 +356,13 @@ namespace InteropEmu {
|
||||
DllExport int64_t __stdcall GetStateInfo(uint32_t stateIndex) { return SaveStateManager::GetStateInfo(stateIndex); }
|
||||
|
||||
DllExport void __stdcall MoviePlay(char* filename) { MovieManager::Play(string(filename)); }
|
||||
DllExport void __stdcall MovieRecord(RecordMovieOptions options) { MovieManager::Record(options); }
|
||||
|
||||
DllExport void __stdcall MovieRecord(RecordMovieOptions *options)
|
||||
{
|
||||
RecordMovieOptions opt = *options;
|
||||
MovieManager::Record(opt);
|
||||
}
|
||||
|
||||
DllExport void __stdcall MovieStop() { MovieManager::Stop(); }
|
||||
DllExport bool __stdcall MoviePlaying() { return MovieManager::Playing(); }
|
||||
DllExport bool __stdcall MovieRecording() { return MovieManager::Recording(); }
|
||||
|
Loading…
Reference in New Issue
Block a user