Commit 66d5a723 authored by mercury233's avatar mercury233

fix compatibility

parent 7d7acda8
......@@ -9,25 +9,25 @@ using YGOSharp.OCGWrapper.Enums;
public static class UIHelper
{
[DllImport("user32.dll")]
[DllImport("user32")]
static extern bool FlashWindow(IntPtr handle, bool invert);
public delegate bool WNDENUMPROC(IntPtr hwnd, IntPtr lParam);
[DllImport("user32.dll", SetLastError = true)]
[DllImport("user32", SetLastError = true)]
static extern bool EnumWindows(WNDENUMPROC lpEnumFunc, IntPtr lParam);
[DllImport("user32.dll", SetLastError = true)]
[DllImport("user32", SetLastError = true)]
static extern IntPtr GetParent(IntPtr hWnd);
[DllImport("user32.dll")]
[DllImport("user32")]
static extern uint GetWindowThreadProcessId(IntPtr hWnd, ref IntPtr lpdwProcessId);
[DllImport("user32.dll")]
[DllImport("user32")]
static extern int GetClassNameW(IntPtr hWnd, [MarshalAs(UnmanagedType.LPWStr)]StringBuilder lpString, int nMaxCount);
[DllImport("user32.dll")]
[DllImport("user32")]
static extern bool IsZoomed(IntPtr hWnd);
[DllImport("user32.dll")]
[DllImport("user32")]
static extern bool ShowWindow(IntPtr hWnd, int nCmdShow);
[DllImport("kernel32.dll")]
[DllImport("kernel32")]
static extern void SetLastError(uint dwErrCode);
static IntPtr myHWND = IntPtr.Zero;
......
......@@ -249,7 +249,13 @@ public class selectDeck : WindowServantSP
string path = "deck/" + superScrollView.selectedString + ".ydk";
if (File.Exists(path))
{
System.Diagnostics.Process.Start("notepad.exe", path);
#if UNITY_EDITOR || UNITY_STANDALONE_WIN //编译器、Windows
System.Diagnostics.Process.Start("notepad.exe", path);
#elif UNITY_STANDALONE_OSX //Mac OS X
System.Diagnostics.Process.Start("open", "-e " + path);
#elif UNITY_STANDALONE_LINUX //Linux
System.Diagnostics.Process.Start("gedit", path);
#endif
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment