Changeset - r2207:2553be73ee95
[Not reviewed]
master
0 4 0
tron - 19 years ago 2005-07-27 19:22:38
tron@openttd.org
(svn r2725) Move MyShowCursor() back into win32.c, it fits better there
4 files changed with 14 insertions and 13 deletions:
0 comments (0 inline, 0 general)
video/win32_v.c
Show inline comments
 
@@ -4,12 +4,13 @@
 
#include "../openttd.h"
 
#include "../functions.h"
 
#include "../gfx.h"
 
#include "../macros.h"
 
#include "../network.h"
 
#include "../variables.h"
 
#include "../win32.h"
 
#include "../window.h"
 
#include "win32_v.h"
 
#include <windows.h>
 

	
 
static struct {
 
	HWND main_wnd;
 
@@ -62,23 +63,12 @@ static void UpdatePalette(HDC dc, uint s
 
		rgb[i].rgbReserved = 0;
 
	}
 

	
 
	SetDIBColorTable(dc, start, count, rgb);
 
}
 

	
 
bool MyShowCursor(bool show)
 
{
 
	if (_wnd.cursor_visible == show)
 
		return show;
 

	
 
	_wnd.cursor_visible = show;
 
	ShowCursor(show);
 

	
 
	return !show;
 
}
 

	
 
typedef struct {
 
	byte vk_from;
 
	byte vk_count;
 
	byte map_to;
 
} VkMapping;
 

	
video/win32_v.h
Show inline comments
 
@@ -2,11 +2,9 @@
 

	
 
#ifndef VIDEO_WIN32_H
 
#define VIDEO_WIN32_H
 

	
 
#include "../hal.h"
 

	
 
bool MyShowCursor(bool show);
 

	
 
extern const HalVideoDriver _win32_video_driver;
 

	
 
#endif
win32.c
Show inline comments
 
@@ -37,12 +37,23 @@ static bool _has_console;
 

	
 
#if defined(__MINGW32__) || defined(__CYGWIN__)
 
	#define __TIMESTAMP__   __DATE__ __TIME__
 
#endif
 

	
 

	
 
bool MyShowCursor(bool show)
 
{
 
	if (_wnd.cursor_visible == show) return show;
 

	
 
	_wnd.cursor_visible = show;
 
	ShowCursor(show);
 

	
 
	return !show;
 
}
 

	
 

	
 
// Helper function needed by dynamically loading SDL
 
bool LoadLibraryList(Function proc[], const char* dll)
 
{
 
	while (*dll != '\0') {
 
		HMODULE lib = LoadLibrary(dll);
 

	
win32.h
Show inline comments
 
/* $Id$ */
 

	
 
#ifndef WIN32_H
 
#define WIN32_H
 

	
 
bool MyShowCursor(bool show);
 

	
 
typedef void (*Function)(int);
 
bool LoadLibraryList(Function proc[], const char* dll);
 

	
 
#endif
0 comments (0 inline, 0 general)