Changeset - r18160:133e96e28508
[Not reviewed]
master
0 12 0
michi_cc - 13 years ago 2011-10-04 21:35:40
michi_cc@openttd.org
(svn r22999) -Codechange: Allow changing the blitter during the running game.
12 files changed with 97 insertions and 46 deletions:
0 comments (0 inline, 0 general)
src/video/allegro_v.cpp
Show inline comments
 
@@ -552,7 +552,12 @@ bool VideoDriver_Allegro::ToggleFullscre
 
		return false;
 
	}
 
	return true;
 
#endif
 
}
 

	
 
bool VideoDriver_Allegro::AfterBlitterChange()
 
{
 
	return CreateMainSurface(_screen.width, _screen.height);
 
}
 

	
 
#endif /* WITH_ALLEGRO */
src/video/allegro_v.h
Show inline comments
 
@@ -25,12 +25,15 @@ public:
 

	
 
	/* virtual */ void MainLoop();
 

	
 
	/* virtual */ bool ChangeResolution(int w, int h);
 

	
 
	/* virtual */ bool ToggleFullscreen(bool fullscreen);
 

	
 
	/* virtual */ bool AfterBlitterChange();
 

	
 
	/* virtual */ const char *GetName() const { return "allegro"; }
 
};
 

	
 
/** Factory for the allegro video driver. */
 
class FVideoDriver_Allegro: public VideoDriverFactory<FVideoDriver_Allegro> {
 
public:
src/video/cocoa/cocoa_v.h
Show inline comments
 
@@ -44,12 +44,17 @@ public:
 
	/** Set a new window mode
 
	 * @param fullscreen Whether to set fullscreen mode or not
 
	 * @return Whether changing the screen mode was successful
 
	 */
 
	/* virtual */ bool ToggleFullscreen(bool fullscreen);
 

	
 
	/** Callback invoked after the blitter was changed.
 
	 * @return True if no error.
 
	 */
 
	/* virtual */ bool AfterBlitterChange();
 

	
 
	/** Return driver name
 
	 * @return driver name
 
	 */
 
	/* virtual */ const char *GetName() const { return "cocoa"; }
 
};
 

	
 
@@ -120,13 +125,13 @@ public:
 

	
 
	/** Change window resolution
 
	 * @param w New window width
 
	 * @param h New window height
 
	 * @return Whether change was successful
 
	 */
 
	virtual bool ChangeResolution(int w, int h) = 0;
 
	virtual bool ChangeResolution(int w, int h, int bpp) = 0;
 

	
 
	/** Are we in fullscreen mode
 
	 * @return whether fullscreen mode is currently used
 
	 */
 
	virtual bool IsFullscreen() = 0;
 

	
src/video/cocoa/cocoa_v.mm
Show inline comments
 
@@ -397,13 +397,13 @@ void VideoDriver_Cocoa::MainLoop()
 
 * @return Whether the video driver was successfully updated.
 
 */
 
bool VideoDriver_Cocoa::ChangeResolution(int w, int h)
 
{
 
	assert(_cocoa_subdriver != NULL);
 

	
 
	bool ret = _cocoa_subdriver->ChangeResolution(w, h);
 
	bool ret = _cocoa_subdriver->ChangeResolution(w, h, BlitterFactoryBase::GetCurrentBlitter()->GetScreenDepth());
 

	
 
	QZ_GameSizeChanged();
 
	QZ_UpdateVideoModes();
 

	
 
	return ret;
 
}
 
@@ -441,12 +441,22 @@ bool VideoDriver_Cocoa::ToggleFullscreen
 
	QZ_UpdateVideoModes();
 

	
 
	return _cocoa_subdriver->IsFullscreen() == full_screen;
 
}
 

	
 
/**
 
 * Callback invoked after the blitter was changed.
 
 *
 
 * @return True if no error.
 
 */
 
bool VideoDriver_Cocoa::AfterBlitterChange()
 
{
 
	return this->ChangeResolution(_screen.width, _screen.height);
 
}
 

	
 
/**
 
 * Catch asserts prior to initialization of the videodriver.
 
 *
 
 * @param title Window title.
 
 * @param message Message text.
 
 * @param buttonLabel Button text.
 
 *
src/video/cocoa/fullscreen.mm
Show inline comments
 
@@ -247,13 +247,13 @@ class FullscreenSubdriver: public CocoaS
 
		double adjustment = (target - position) / linesPerSecond;
 

	
 
		CSleep((uint32)(adjustment * 1000));
 
	}
 

	
 

	
 
	bool SetVideoMode(int w, int h)
 
	bool SetVideoMode(int w, int h, int bpp)
 
	{
 
		/* Define this variables at the top (against coding style) because
 
		 * otherwise GCC 4.2 barfs at the goto's jumping over variable initialization. */
 
		NSRect screen_rect;
 
		int gamma_error;
 
		NSPoint mouseLocation;
 
@@ -263,20 +263,20 @@ class FullscreenSubdriver: public CocoaS
 
			free(this->pixel_buffer);
 
			this->pixel_buffer = NULL;
 
		}
 

	
 
		/* See if requested mode exists */
 
		boolean_t exact_match;
 
		this->cur_mode = CGDisplayBestModeForParameters(this->display_id, this->device_depth, w, h, &exact_match);
 
		this->cur_mode = CGDisplayBestModeForParameters(this->display_id, bpp, w, h, &exact_match);
 

	
 
		/* If the mode wasn't an exact match, check if it has the right bpp, and update width and height */
 
		if (!exact_match) {
 
			int bpp;
 
			int act_bpp;
 
			CFNumberRef number = (const __CFNumber*) CFDictionaryGetValue(this->cur_mode, kCGDisplayBitsPerPixel);
 
			CFNumberGetValue(number, kCFNumberSInt32Type, &bpp);
 
			if (bpp != this->device_depth) {
 
			CFNumberGetValue(number, kCFNumberSInt32Type, &act_bpp);
 
			if (act_bpp != bpp) {
 
				DEBUG(driver, 0, "Failed to find display resolution");
 
				goto ERR_NO_MATCH;
 
			}
 

	
 
			number = (const __CFNumber*)CFDictionaryGetValue(this->cur_mode, kCGDisplayWidth);
 
			CFNumberGetValue(number, kCFNumberSInt32Type, &w);
 
@@ -320,12 +320,13 @@ class FullscreenSubdriver: public CocoaS
 
			this->window_pitch  = CGDisplayBytesPerRow(this->display_id);
 
#endif
 
		}
 

	
 
		this->device_width  = CGDisplayPixelsWide(this->display_id);
 
		this->device_height = CGDisplayPixelsHigh(this->display_id);
 
		this->device_depth  = bpp;
 

	
 
		/* Setup double-buffer emulation */
 
		this->pixel_buffer = malloc(this->device_width * this->device_height * this->device_depth / 8);
 
		if (this->pixel_buffer == NULL) {
 
			DEBUG(driver, 0, "Failed to allocate memory for double buffering");
 
			goto ERR_DOUBLEBUF;
 
@@ -415,28 +416,24 @@ ERR_NO_MATCH:
 

	
 
		this->device_width  = CGDisplayPixelsWide(this->display_id);
 
		this->device_height = CGDisplayPixelsHigh(this->display_id);
 
	}
 

	
 
public:
 
	FullscreenSubdriver(int bpp)
 
	FullscreenSubdriver()
 
	{
 
		if (bpp != 8 && bpp != 32) {
 
			error("Cocoa: This video driver only supports 8 and 32 bpp blitters.");
 
		}
 

	
 
		/* Initialize the video settings; this data persists between mode switches */
 
		this->display_id = kCGDirectMainDisplay;
 
		this->save_mode  = CGDisplayCurrentMode(this->display_id);
 

	
 
		if (bpp == 8) this->palette = CGPaletteCreateDefaultColorPalette();
 
		this->palette = CGPaletteCreateDefaultColorPalette();
 

	
 
		this->device_width  = CGDisplayPixelsWide(this->display_id);
 
		this->device_height = CGDisplayPixelsHigh(this->display_id);
 
		this->device_depth  = bpp;
 
		this->pixel_buffer   = NULL;
 
		this->device_depth  = 0;
 
		this->pixel_buffer  = NULL;
 

	
 
		this->num_dirty_rects = MAX_DIRTY_RECTS;
 
	}
 

	
 
	virtual ~FullscreenSubdriver()
 
	{
 
@@ -509,20 +506,22 @@ public:
 

	
 
	virtual uint ListModes(OTTD_Point *modes, uint max_modes)
 
	{
 
		return QZ_ListModes(modes, max_modes, this->display_id, this->device_depth);
 
	}
 

	
 
	virtual bool ChangeResolution(int w, int h)
 
	virtual bool ChangeResolution(int w, int h, int bpp)
 
	{
 
		int old_width  = this->device_width;
 
		int old_height = this->device_height;
 
		int old_bpp    = this->device_depth;
 

	
 
		if (SetVideoMode(w, h)) return true;
 
		if (bpp != 8 && bpp != 32) error("Cocoa: This video driver only supports 8 and 32 bpp blitters.");
 

	
 
		if (old_width != 0 && old_height != 0) SetVideoMode(old_width, old_height);
 
		if (SetVideoMode(w, h, bpp)) return true;
 
		if (old_width != 0 && old_height != 0) SetVideoMode(old_width, old_height, old_bpp);
 

	
 
		return false;
 
	}
 

	
 
	virtual bool IsFullscreen()
 
	{
 
@@ -580,15 +579,15 @@ CocoaSubdriver *QZ_CreateFullscreenSubdr
 
	 * been removed from the API.
 
	 */
 
	if (MacOSVersionIsAtLeast(10, 7, 0)) {
 
		return NULL;
 
	}
 

	
 
	FullscreenSubdriver *ret = new FullscreenSubdriver(bpp);
 
	FullscreenSubdriver *ret = new FullscreenSubdriver();
 

	
 
	if (!ret->ChangeResolution(width, height)) {
 
	if (!ret->ChangeResolution(width, height, bpp)) {
 
		delete ret;
 
		return NULL;
 
	}
 

	
 
	return ret;
 
}
src/video/cocoa/wnd_quartz.mm
Show inline comments
 
@@ -60,25 +60,25 @@ private:
 
	 * @param right The x coord for the right edge of the box to blit.
 
	 * @param bottom The y coord for the bottom edge of the box to blit.
 
	 */
 
	void BlitIndexedToView32(int left, int top, int right, int bottom);
 

	
 
	virtual void GetDeviceInfo();
 
	virtual bool SetVideoMode(int width, int height);
 
	virtual bool SetVideoMode(int width, int height, int bpp);
 

	
 
public:
 
	WindowQuartzSubdriver(int bpp);
 
	WindowQuartzSubdriver();
 
	virtual ~WindowQuartzSubdriver();
 

	
 
	virtual void Draw(bool force_update);
 
	virtual void MakeDirty(int left, int top, int width, int height);
 
	virtual void UpdatePalette(uint first_color, uint num_colors);
 

	
 
	virtual uint ListModes(OTTD_Point *modes, uint max_modes);
 

	
 
	virtual bool ChangeResolution(int w, int h);
 
	virtual bool ChangeResolution(int w, int h, int bpp);
 

	
 
	virtual bool IsFullscreen() { return false; }
 
	virtual bool ToggleFullscreen(); /* Full screen mode on OSX 10.7 */
 

	
 
	virtual int GetWidth() { return window_width; }
 
	virtual int GetHeight() { return window_height; }
 
@@ -245,13 +245,13 @@ bool WindowQuartzSubdriver::ToggleFullsc
 
	return true;
 
#else
 
	return false;
 
#endif
 
}
 

	
 
bool WindowQuartzSubdriver::SetVideoMode(int width, int height)
 
bool WindowQuartzSubdriver::SetVideoMode(int width, int height, int bpp)
 
{
 
	this->setup = true;
 
	this->GetDeviceInfo();
 

	
 
	if (width > this->device_width) width = this->device_width;
 
	if (height > this->device_height) height = this->device_height;
 
@@ -334,12 +334,13 @@ bool WindowQuartzSubdriver::SetVideoMode
 
			[ this->cocoaview setFrameSize:contentRect.size ];
 
		}
 
	}
 

	
 
	this->window_width = width;
 
	this->window_height = height;
 
	this->buffer_depth = bpp;
 

	
 
	[ this->window center ];
 

	
 
	/* Only recreate the view if it doesn't already exist */
 
	if (this->cocoaview == nil) {
 
		this->cocoaview = [ [ OTTD_QuartzView alloc ] initWithFrame:contentRect ];
 
@@ -378,17 +379,17 @@ void WindowQuartzSubdriver::BlitIndexedT
 
			dst[y * pitch + x] = pal[src[y * width + x]];
 
		}
 
	}
 
}
 

	
 

	
 
WindowQuartzSubdriver::WindowQuartzSubdriver(int bpp)
 
WindowQuartzSubdriver::WindowQuartzSubdriver()
 
{
 
	this->window_width  = 0;
 
	this->window_height = 0;
 
	this->buffer_depth  = bpp;
 
	this->buffer_depth  = 0;
 
	this->window_buffer  = NULL;
 
	this->pixel_buffer  = NULL;
 
	this->active        = false;
 
	this->setup         = false;
 

	
 
	this->window = nil;
 
@@ -478,19 +479,20 @@ void WindowQuartzSubdriver::UpdatePalett
 

	
 
uint WindowQuartzSubdriver::ListModes(OTTD_Point *modes, uint max_modes)
 
{
 
	return QZ_ListModes(modes, max_modes, kCGDirectMainDisplay, this->buffer_depth);
 
}
 

	
 
bool WindowQuartzSubdriver::ChangeResolution(int w, int h)
 
bool WindowQuartzSubdriver::ChangeResolution(int w, int h, int bpp)
 
{
 
	int old_width  = this->window_width;
 
	int old_height = this->window_height;
 
	int old_bpp    = this->buffer_depth;
 

	
 
	if (this->SetVideoMode(w, h)) return true;
 
	if (old_width != 0 && old_height != 0) this->SetVideoMode(old_width, old_height);
 
	if (this->SetVideoMode(w, h, bpp)) return true;
 
	if (old_width != 0 && old_height != 0) this->SetVideoMode(old_width, old_height, old_bpp);
 

	
 
	return false;
 
}
 

	
 
/* Convert local coordinate to window server (CoreGraphics) coordinate */
 
CGPoint WindowQuartzSubdriver::PrivateLocalToCG(NSPoint *p)
 
@@ -596,15 +598,15 @@ CocoaSubdriver *QZ_CreateWindowQuartzSub
 

	
 
	if (bpp != 8 && bpp != 32) {
 
		DEBUG(driver, 0, "The cocoa quartz subdriver only supports 8 and 32 bpp.");
 
		return NULL;
 
	}
 

	
 
	WindowQuartzSubdriver *ret = new WindowQuartzSubdriver(bpp);
 
	WindowQuartzSubdriver *ret = new WindowQuartzSubdriver();
 

	
 
	if (!ret->ChangeResolution(width, height)) {
 
	if (!ret->ChangeResolution(width, height, bpp)) {
 
		delete ret;
 
		return NULL;
 
	}
 

	
 
	return ret;
 
}
src/video/cocoa/wnd_quickdraw.mm
Show inline comments
 
@@ -78,25 +78,25 @@ private:
 
	void BlitIndexedToView16(int left, int top, int right, int bottom);
 

	
 
	inline void BlitToView(int left, int top, int right, int bottom);
 
	void DrawResizeIcon();
 

	
 
	virtual void GetDeviceInfo();
 
	virtual bool SetVideoMode(int width, int height);
 
	virtual bool SetVideoMode(int width, int height, int bpp);
 

	
 
public:
 
	WindowQuickdrawSubdriver(int bpp);
 
	WindowQuickdrawSubdriver();
 
	virtual ~WindowQuickdrawSubdriver();
 

	
 
	virtual void Draw(bool force_update);
 
	virtual void MakeDirty(int left, int top, int width, int height);
 
	virtual void UpdatePalette(uint first_color, uint num_colors);
 

	
 
	virtual uint ListModes(OTTD_Point *modes, uint max_modes);
 

	
 
	virtual bool ChangeResolution(int w, int h);
 
	virtual bool ChangeResolution(int w, int h, int bpp);
 

	
 
	virtual bool IsFullscreen() { return false; }
 

	
 
	virtual int GetWidth() { return window_width; }
 
	virtual int GetHeight() { return window_height; }
 
	virtual void *GetPixelBuffer() { return pixel_buffer; }
 
@@ -149,18 +149,18 @@ void WindowQuickdrawSubdriver::GetDevice
 
		kCFNumberSInt32Type, &this->device_width);
 

	
 
	CFNumberGetValue((const __CFNumber*)CFDictionaryGetValue(cur_mode, kCGDisplayHeight),
 
		kCFNumberSInt32Type, &this->device_height);
 
}
 

	
 
bool WindowQuickdrawSubdriver::SetVideoMode(int width, int height)
 
bool WindowQuickdrawSubdriver::SetVideoMode(int width, int height, int bpp)
 
{
 
	this->setup = true;
 
	this->GetDeviceInfo();
 

	
 
	if (this->buffer_depth > this->device_depth) {
 
	if (bpp > this->device_depth) {
 
		DEBUG(driver, 0, "Cannot use a blitter with a higer screen depth than the display when running in windowed mode.");
 
		this->setup = false;
 
		return false;
 
	}
 

	
 
	if (width > this->device_width) width = this->device_width;
 
@@ -214,12 +214,13 @@ bool WindowQuickdrawSubdriver::SetVideoM
 
		[ this->cocoaview setFrameSize:contentRect.size ];
 
	}
 

	
 
	/* Update again */
 
	this->window_width = width;
 
	this->window_height = height;
 
	this->buffer_depth = bpp;
 

	
 
	[ this->window center ];
 

	
 
	/* Only recreate the view if it doesn't already exist */
 
	if (this->cocoaview == nil) {
 
		this->cocoaview = [ [ NSQuickDrawView alloc ] initWithFrame:contentRect ];
 
@@ -332,17 +333,17 @@ void WindowQuickdrawSubdriver::DrawResiz
 
			}
 
			break;
 
	}
 
}
 

	
 

	
 
WindowQuickdrawSubdriver::WindowQuickdrawSubdriver(int bpp)
 
WindowQuickdrawSubdriver::WindowQuickdrawSubdriver()
 
{
 
	this->window_width  = 0;
 
	this->window_height = 0;
 
	this->buffer_depth  = bpp;
 
	this->buffer_depth  = 0;
 
	this->pixel_buffer  = NULL;
 
	this->active        = false;
 
	this->setup         = false;
 

	
 
	this->window = nil;
 
	this->cocoaview = nil;
 
@@ -437,20 +438,21 @@ void WindowQuickdrawSubdriver::UpdatePal
 

	
 
uint WindowQuickdrawSubdriver::ListModes(OTTD_Point *modes, uint max_modes)
 
{
 
	return QZ_ListModes(modes, max_modes, kCGDirectMainDisplay, this->buffer_depth);
 
}
 

	
 
bool WindowQuickdrawSubdriver::ChangeResolution(int w, int h)
 
bool WindowQuickdrawSubdriver::ChangeResolution(int w, int h, int bpp)
 
{
 
	int old_width  = this->window_width;
 
	int old_height = this->window_height;
 
	int old_bpp    = this->buffer_depth;
 

	
 
	if (this->SetVideoMode(w, h)) return true;
 
	if (this->SetVideoMode(w, h, bpp)) return true;
 

	
 
	if (old_width != 0 && old_height != 0) this->SetVideoMode(old_width, old_height);
 
	if (old_width != 0 && old_height != 0) this->SetVideoMode(old_width, old_height, old_bpp);
 

	
 
	return false;
 
}
 

	
 
/* Convert local coordinate to window server (CoreGraphics) coordinate */
 
CGPoint WindowQuickdrawSubdriver::PrivateLocalToCG(NSPoint *p)
 
@@ -541,15 +543,15 @@ CocoaSubdriver *QZ_CreateWindowQuickdraw
 

	
 
	if (bpp != 8 && bpp != 32) {
 
		DEBUG(driver, 0, "The cocoa quickdraw subdriver only supports 8 and 32 bpp.");
 
		return NULL;
 
	}
 

	
 
	ret = new WindowQuickdrawSubdriver(bpp);
 
	ret = new WindowQuickdrawSubdriver();
 

	
 
	if (!ret->ChangeResolution(width, height)) {
 
	if (!ret->ChangeResolution(width, height, bpp)) {
 
		delete ret;
 
		return NULL;
 
	}
 

	
 
	return ret;
 
}
src/video/sdl_v.cpp
Show inline comments
 
@@ -632,7 +632,12 @@ bool VideoDriver_SDL::ToggleFullscreen(b
 
		_fullscreen ^= true;
 
		return false;
 
	}
 
	return true;
 
}
 

	
 
bool VideoDriver_SDL::AfterBlitterChange()
 
{
 
	return this->ChangeResolution(_screen.width, _screen.height)
 
}
 

	
 
#endif /* WITH_SDL */
src/video/sdl_v.h
Show inline comments
 
@@ -25,12 +25,15 @@ public:
 

	
 
	/* virtual */ void MainLoop();
 

	
 
	/* virtual */ bool ChangeResolution(int w, int h);
 

	
 
	/* virtual */ bool ToggleFullscreen(bool fullscreen);
 

	
 
	/* virtual */ bool AfterBlitterChange();
 

	
 
	/* virtual */ const char *GetName() const { return "sdl"; }
 
};
 

	
 
/** Factory for the SDL video driver. */
 
class FVideoDriver_SDL: public VideoDriverFactory<FVideoDriver_SDL> {
 
public:
src/video/video_driver.hpp
Show inline comments
 
@@ -45,12 +45,21 @@ public:
 
	 * @param fullscreen The new setting.
 
	 * @return True if the change succeeded.
 
	 */
 
	virtual bool ToggleFullscreen(bool fullscreen) = 0;
 

	
 
	/**
 
	 * Callback invoked after the blitter was changed.
 
	 * @return True if no error.
 
	 */
 
	virtual bool AfterBlitterChange()
 
	{
 
		return true;
 
	}
 

	
 
	/**
 
	 * Whether the driver has a graphical user interface with the end user.
 
	 * Or in other words, whether we should spawn a thread for world generation
 
	 * and NewGRF scanning so the graphical updates can keep coming. Otherwise
 
	 * progress has to be shown on the console, which uses by definition another
 
	 * thread/process for display purposes.
 
	 * @return True for all drivers except null and dedicated.
src/video/win32_v.cpp
Show inline comments
 
@@ -146,13 +146,13 @@ static uint MapWindowsKey(uint sym)
 
	if (GetAsyncKeyState(VK_SHIFT)   < 0) key |= WKC_SHIFT;
 
	if (GetAsyncKeyState(VK_CONTROL) < 0) key |= WKC_CTRL;
 
	if (GetAsyncKeyState(VK_MENU)    < 0) key |= WKC_ALT;
 
	return key;
 
}
 

	
 
static bool AllocateDibSection(int w, int h);
 
static bool AllocateDibSection(int w, int h, bool force = false);
 

	
 
static void ClientSizeChanged(int w, int h)
 
{
 
	/* allocate new dib section of the new size */
 
	if (AllocateDibSection(w, h)) {
 
		/* mark all palette colors dirty */
 
@@ -687,24 +687,24 @@ static void RegisterWndClass()
 

	
 
		registered = true;
 
		if (!RegisterClass(&wnd)) usererror("RegisterClass failed");
 
	}
 
}
 

	
 
static bool AllocateDibSection(int w, int h)
 
static bool AllocateDibSection(int w, int h, bool force)
 
{
 
	BITMAPINFO *bi;
 
	HDC dc;
 
	int bpp = BlitterFactoryBase::GetCurrentBlitter()->GetScreenDepth();
 

	
 
	w = max(w, 64);
 
	h = max(h, 64);
 

	
 
	if (bpp == 0) usererror("Can't use a blitter that blits 0 bpp for normal visuals");
 

	
 
	if (w == _screen.width && h == _screen.height) return false;
 
	if (!force && w == _screen.width && h == _screen.height) return false;
 

	
 
	_screen.width = w;
 
	_screen.pitch = (bpp == 8) ? Align(w, 4) : w;
 
	_screen.height = h;
 
	bi = (BITMAPINFO*)alloca(sizeof(BITMAPINFOHEADER) + sizeof(RGBQUAD) * 256);
 
	memset(bi, 0, sizeof(BITMAPINFOHEADER) + sizeof(RGBQUAD) * 256);
 
@@ -924,6 +924,11 @@ bool VideoDriver_Win32::ChangeResolution
 
}
 

	
 
bool VideoDriver_Win32::ToggleFullscreen(bool full_screen)
 
{
 
	return this->MakeWindow(full_screen);
 
}
 

	
 
bool VideoDriver_Win32::AfterBlitterChange()
 
{
 
	return AllocateDibSection(_screen.width, _screen.height, true) && this->MakeWindow(_fullscreen);
 
}
src/video/win32_v.h
Show inline comments
 
@@ -25,12 +25,15 @@ public:
 

	
 
	/* virtual */ void MainLoop();
 

	
 
	/* virtual */ bool ChangeResolution(int w, int h);
 

	
 
	/* virtual */ bool ToggleFullscreen(bool fullscreen);
 

	
 
	/* virtual */ bool AfterBlitterChange();
 

	
 
	/* virtual */ const char *GetName() const { return "win32"; }
 

	
 
	bool MakeWindow(bool full_screen);
 
};
 

	
 
/** The factory for Windows' video driver. */
0 comments (0 inline, 0 general)