#include "wingdi.h"
#include "winuser.h"
#include "wincon.h"
-#include "miscemu.h"
#include "dosexe.h"
#include "vga.h"
#include "ddraw.h"
{
LARGE_INTEGER when;
- when.s.LowPart = when.s.HighPart = 0;
+ when.u.LowPart = when.u.HighPart = 0;
SetWaitableTimer( VGA_timer, &when, arg, VGA_Poll, 0, FALSE );
}
return VGA_timer_thread ? TRUE : FALSE;
}
-HANDLE VGA_AlphaConsole(void)
+static HANDLE VGA_AlphaConsole(void)
{
/* this assumes that no Win32 redirection has taken place, but then again,
* only 16-bit apps are likely to use this part of Wine... */
return GetStdHandle(STD_OUTPUT_HANDLE);
}
-char*VGA_AlphaBuffer(void)
+static char*VGA_AlphaBuffer(void)
{
return (char *)0xb8000;
}
newSize = 256 * 1024;
if(vga_fb_size < newSize) {
- if(vga_fb_data)
- HeapFree(GetProcessHeap(), 0, vga_fb_data);
+ HeapFree(GetProcessHeap(), 0, vga_fb_data);
vga_fb_data = HeapAlloc(GetProcessHeap(), 0, newSize);
vga_fb_size = newSize;
}
return 0;
}
-void VGA_Exit(void)
+static void VGA_Exit(void)
{
if (lpddraw) MZ_RunInThread(VGA_DoExit, 0);
}
return vga_fb_window;
}
+
+/**********************************************************************
+ * VGA_DoShowMouse
+ *
+ * Callback for VGA_ShowMouse.
+ */
+static WINAPI void VGA_DoShowMouse( ULONG_PTR show )
+{
+ INT rv;
+
+ do
+ {
+ rv = ShowCursor( show );
+ }
+ while( show ? (rv < 0) : (rv >= 0) );
+}
+
+
+/**********************************************************************
+ * VGA_ShowMouse
+ *
+ * If argument is TRUE, unconditionally show mouse cursor.
+ * If argument is FALSE, unconditionally hide mouse cursor.
+ * This only works in graphics mode.
+ */
+void VGA_ShowMouse( BOOL show )
+{
+ if (lpddraw)
+ MZ_RunInThread( VGA_DoShowMouse, (ULONG_PTR)show );
+}
+
+
/*** TEXT MODE ***/
/* prepare the text mode video memory copy that is used to only
* update the video memory line that did get updated. */
-void VGA_PrepareVideoMemCopy(unsigned Xres, unsigned Yres)
+static void VGA_PrepareVideoMemCopy(unsigned Xres, unsigned Yres)
{
char *p, *p2;
- int i;
+ unsigned int i;
/*
* Allocate space for char + attr.
void VGA_PutChar(BYTE ascii)
{
+ DWORD w;
+
EnterCriticalSection(&vga_lock);
switch(ascii) {
case '\b':
if (vga_text_x)
+ {
vga_text_x--;
+ VGA_PutCharAt(vga_text_x, vga_text_y, ' ', 0);
+ }
break;
case '\t':
* If we don't have a console, write directly to standard output.
*/
if(!vga_text_console)
- WriteFile(VGA_AlphaConsole(), &ascii, 1, NULL, NULL);
+ WriteFile(VGA_AlphaConsole(), &ascii, 1, &w, NULL);
LeaveCriticalSection(&vga_lock);
}