mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-26 15:57:56 +01:00
Bring fixes from mono-curses
This commit is contained in:
@@ -53,9 +53,9 @@ namespace Unix.Terminal {
|
|||||||
static void FindNCurses ()
|
static void FindNCurses ()
|
||||||
{
|
{
|
||||||
if (File.Exists ("/usr/lib/libncurses.dylib"))
|
if (File.Exists ("/usr/lib/libncurses.dylib"))
|
||||||
curses_handle = dlopen ("libncurses.dylib", 0);
|
curses_handle = dlopen ("libncurses.dylib", 1);
|
||||||
else
|
else
|
||||||
curses_handle = dlopen ("libncurses.so", 0);
|
curses_handle = dlopen ("libncurses.so", 1);
|
||||||
|
|
||||||
if (curses_handle == IntPtr.Zero)
|
if (curses_handle == IntPtr.Zero)
|
||||||
throw new Exception ("Could not dlopen ncurses");
|
throw new Exception ("Could not dlopen ncurses");
|
||||||
@@ -314,10 +314,10 @@ namespace Unix.Terminal {
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
[DllImport ("libc")]
|
[DllImport ("dl")]
|
||||||
extern static IntPtr dlopen (string file, int mode);
|
extern static IntPtr dlopen (string file, int mode);
|
||||||
|
|
||||||
[DllImport ("libc")]
|
[DllImport ("dl")]
|
||||||
extern static IntPtr dlsym (IntPtr handle, string symbol);
|
extern static IntPtr dlsym (IntPtr handle, string symbol);
|
||||||
|
|
||||||
static IntPtr stdscr;
|
static IntPtr stdscr;
|
||||||
|
|||||||
@@ -243,6 +243,7 @@ namespace Mono.Terminal {
|
|||||||
foreach (var fd in descriptorWatchers.Keys){
|
foreach (var fd in descriptorWatchers.Keys){
|
||||||
pollmap [i].fd = fd;
|
pollmap [i].fd = fd;
|
||||||
pollmap [i].events = MapCondition (descriptorWatchers [fd].Condition);
|
pollmap [i].events = MapCondition (descriptorWatchers [fd].Condition);
|
||||||
|
i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user