mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r2725) Move MyShowCursor() back into win32.c, it fits better there
This commit is contained in:
parent
6f74bbaeec
commit
286f8726d5
|
@ -7,6 +7,7 @@
|
||||||
#include "../macros.h"
|
#include "../macros.h"
|
||||||
#include "../network.h"
|
#include "../network.h"
|
||||||
#include "../variables.h"
|
#include "../variables.h"
|
||||||
|
#include "../win32.h"
|
||||||
#include "../window.h"
|
#include "../window.h"
|
||||||
#include "win32_v.h"
|
#include "win32_v.h"
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
@ -65,17 +66,6 @@ static void UpdatePalette(HDC dc, uint start, uint count)
|
||||||
SetDIBColorTable(dc, start, count, rgb);
|
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 {
|
typedef struct {
|
||||||
byte vk_from;
|
byte vk_from;
|
||||||
byte vk_count;
|
byte vk_count;
|
||||||
|
|
|
@ -5,8 +5,6 @@
|
||||||
|
|
||||||
#include "../hal.h"
|
#include "../hal.h"
|
||||||
|
|
||||||
bool MyShowCursor(bool show);
|
|
||||||
|
|
||||||
extern const HalVideoDriver _win32_video_driver;
|
extern const HalVideoDriver _win32_video_driver;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
11
win32.c
11
win32.c
|
@ -40,6 +40,17 @@ static bool _has_console;
|
||||||
#endif
|
#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
|
// Helper function needed by dynamically loading SDL
|
||||||
bool LoadLibraryList(Function proc[], const char* dll)
|
bool LoadLibraryList(Function proc[], const char* dll)
|
||||||
{
|
{
|
||||||
|
|
2
win32.h
2
win32.h
|
@ -3,6 +3,8 @@
|
||||||
#ifndef WIN32_H
|
#ifndef WIN32_H
|
||||||
#define WIN32_H
|
#define WIN32_H
|
||||||
|
|
||||||
|
bool MyShowCursor(bool show);
|
||||||
|
|
||||||
typedef void (*Function)(int);
|
typedef void (*Function)(int);
|
||||||
bool LoadLibraryList(Function proc[], const char* dll);
|
bool LoadLibraryList(Function proc[], const char* dll);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue