Changeset - r2208:adb18646c021
[Not reviewed]
master
0 2 0
tron - 19 years ago 2005-07-27 19:25:50
tron@openttd.org
(svn r2726) Fix last commit
2 files changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
video/win32_v.c
Show inline comments
 
@@ -12,25 +12,24 @@
 
#include "win32_v.h"
 
#include <windows.h>
 

	
 
static struct {
 
	HWND main_wnd;
 
	HBITMAP dib_sect;
 
	Pixel *bitmap_bits;
 
	Pixel *buffer_bits;
 
	Pixel *alloced_bits;
 
	HPALETTE gdi_palette;
 
	int width,height;
 
	int width_org, height_org;
 
	bool cursor_visible;
 
	bool switch_driver;
 
	bool fullscreen;
 
	bool double_size;
 
	bool has_focus;
 
	bool running;
 
} _wnd;
 

	
 
static void MakePalette(void)
 
{
 
	LOGPALETTE *pal;
 
	uint i;
 

	
 
@@ -623,25 +622,24 @@ static void FindResolutions(void)
 
		memcpy(_resolutions, default_resolutions, sizeof(default_resolutions));
 
		n = lengthof(default_resolutions);
 
	}
 

	
 
	_num_resolutions = n;
 
	SortResolutions(_num_resolutions);
 
}
 

	
 

	
 
static const char *Win32GdiStart(const char * const *parm)
 
{
 
	memset(&_wnd, 0, sizeof(_wnd));
 
	_wnd.cursor_visible = true;
 

	
 
	RegisterWndClass();
 

	
 
	MakePalette();
 

	
 
	FindResolutions();
 

	
 
	// fullscreen uses those
 
	_wnd.width_org = _cur_resolution[0];
 
	_wnd.height_org = _cur_resolution[1];
 

	
 
	AllocateDibSection(_cur_resolution[0], _cur_resolution[1]);
win32.c
Show inline comments
 
@@ -31,24 +31,26 @@
 
#include "video/dedicated_v.h"
 
#include "video/null_v.h"
 
#include "video/sdl_v.h"
 
#include "video/win32_v.h"
 

	
 
static bool _has_console;
 

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

	
 

	
 
static bool cursor_visible = true;
 

	
 
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
0 comments (0 inline, 0 general)