diff options
| author | Kamil Zbróg | 2014-01-12 18:44:51 +0000 | 
|---|---|---|
| committer | Kamil Zbróg | 2014-01-12 18:44:51 +0000 | 
| commit | 444934a0accec982f55db92c17ef65270fe18e66 (patch) | |
| tree | f62210b1ff15696accd87d97b68b03688a153156 /backends | |
| parent | e94fabc37407a7d300af04493b0f5cbced42a092 (diff) | |
| parent | 1a4f951f8bff52f6185304722f2ab9cf9bcd58f4 (diff) | |
| download | scummvm-rg350-444934a0accec982f55db92c17ef65270fe18e66.tar.gz scummvm-rg350-444934a0accec982f55db92c17ef65270fe18e66.tar.bz2 scummvm-rg350-444934a0accec982f55db92c17ef65270fe18e66.zip | |
Merge remote-tracking branch 'sync/master' into prince-malik
Diffstat (limited to 'backends')
| -rw-r--r-- | backends/graphics/surfacesdl/surfacesdl-graphics.cpp | 8 | ||||
| -rw-r--r-- | backends/platform/android/gfx.cpp | 8 | ||||
| -rw-r--r-- | backends/platform/dc/dc-fs.cpp | 2 | ||||
| -rw-r--r-- | backends/platform/dc/dc.h | 2 | ||||
| -rw-r--r-- | backends/platform/dc/dcmain.cpp | 6 | ||||
| -rw-r--r-- | backends/platform/dc/icon.cpp | 4 | ||||
| -rw-r--r-- | backends/platform/dc/input.cpp | 11 | ||||
| -rw-r--r-- | backends/platform/dc/softkbd.h | 1 | 
8 files changed, 29 insertions, 13 deletions
| diff --git a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp index c946b8e747..0a4dcf3ea3 100644 --- a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp +++ b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp @@ -267,7 +267,11 @@ const OSystem::GraphicsMode *SurfaceSdlGraphicsManager::getSupportedGraphicsMode  }  int SurfaceSdlGraphicsManager::getDefaultGraphicsMode() const { +#ifdef USE_SCALERS  	return GFX_DOUBLESIZE; +#else +	return GFX_NORMAL; +#endif  }  void SurfaceSdlGraphicsManager::resetGraphicsScale() { @@ -1076,7 +1080,9 @@ void SurfaceSdlGraphicsManager::internUpdateScreen() {  		for (r = _dirtyRectList; r != lastRect; ++r) {  			register int dst_y = r->y + _currentShakePos;  			register int dst_h = 0; +#ifdef USE_SCALERS  			register int orig_dst_y = 0; +#endif  			register int rx1 = r->x * scale1;  			if (dst_y < height) { @@ -1084,7 +1090,9 @@ void SurfaceSdlGraphicsManager::internUpdateScreen() {  				if (dst_h > height - dst_y)  					dst_h = height - dst_y; +#ifdef USE_SCALERS  				orig_dst_y = dst_y; +#endif  				dst_y = dst_y * scale1;  				if (_videoMode.aspectRatioCorrection && !_overlayVisible) diff --git a/backends/platform/android/gfx.cpp b/backends/platform/android/gfx.cpp index 882dcff9a4..0ce95a3cfb 100644 --- a/backends/platform/android/gfx.cpp +++ b/backends/platform/android/gfx.cpp @@ -233,7 +233,7 @@ void OSystem_Android::initViewport() {  	GLCALL(glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_FASTEST));  	GLCALL(glEnable(GL_BLEND)); -	GLCALL(glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA)); +	GLCALL(glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA));  	GLCALL(glEnableClientState(GL_VERTEX_ARRAY));  	GLCALL(glEnableClientState(GL_TEXTURE_COORD_ARRAY)); @@ -726,7 +726,7 @@ void OSystem_Android::setMouseCursor(const void *buf, uint w, uint h,  		_mouse_keycolor = keycolor;  		p = _mouse_texture_palette->palette() + _mouse_keycolor * 2; -		WRITE_UINT16(p, READ_UINT16(p) & ~1); +		WRITE_UINT16(p, 0);  	}  	if (w == 0 || h == 0) @@ -779,7 +779,7 @@ void OSystem_Android::setCursorPaletteInternal(const byte *colors,  		WRITE_UINT16(p, pf.RGBToColor(colors[0], colors[1], colors[2]));  	p = _mouse_texture_palette->palette() + _mouse_keycolor * 2; -	WRITE_UINT16(p, READ_UINT16(p) & ~1); +	WRITE_UINT16(p, 0);  }  void OSystem_Android::setCursorPalette(const byte *colors, @@ -821,7 +821,7 @@ void OSystem_Android::disableCursorPalette() {  		}  		byte *p = _mouse_texture_palette->palette() + _mouse_keycolor * 2; -		WRITE_UINT16(p, READ_UINT16(p) & ~1); +		WRITE_UINT16(p, 0);  	}  } diff --git a/backends/platform/dc/dc-fs.cpp b/backends/platform/dc/dc-fs.cpp index 36f5a1465c..f850c9d26f 100644 --- a/backends/platform/dc/dc-fs.cpp +++ b/backends/platform/dc/dc-fs.cpp @@ -27,7 +27,9 @@  #include <ronin/cdfs.h>  #include <stdio.h> +#define usleep usleep_unistd  #include <unistd.h> +#undef usleep  /**   * Implementation of the ScummVM file system API based on Ronin. diff --git a/backends/platform/dc/dc.h b/backends/platform/dc/dc.h index d62ced02e1..ba60c7740e 100644 --- a/backends/platform/dc/dc.h +++ b/backends/platform/dc/dc.h @@ -43,7 +43,9 @@ class Interactive   public:    virtual int key(int k, byte &shiftFlags) = 0;    virtual void mouse(int x, int y) = 0; +  virtual ~Interactive() = 0;  }; +inline Interactive::~Interactive() { }  #include "softkbd.h" diff --git a/backends/platform/dc/dcmain.cpp b/backends/platform/dc/dcmain.cpp index bec1fdae3a..36a22c4b5c 100644 --- a/backends/platform/dc/dcmain.cpp +++ b/backends/platform/dc/dcmain.cpp @@ -79,13 +79,14 @@ static bool find_track(int track, int &first_sec, int &last_sec)    if (first < 1 || last > 99 || first > last)      return false;    for (i=first; i<=last; i++) -    if (!(TOC_CTRL(toc->entry[i-1])&4)) +    if (!(TOC_CTRL(toc->entry[i-1])&4)) {        if (track==1) {  	first_sec = TOC_LBA(toc->entry[i-1]);  	last_sec = TOC_LBA(toc->entry[i]);  	return true;        } else  	--track; +    }    return false;  } @@ -281,7 +282,7 @@ namespace DC_Flash {  	if((r = syscall_read_flash(info[0] + (bmb++ << 6), bm, 64))<0)  	  return r;        } -      if(!(bm[(b>>3)&63] & (0x80>>(b&7)))) +      if(!(bm[(b>>3)&63] & (0x80>>(b&7)))) {  	if((r = syscall_read_flash(info[0] + ((b+1) << 6), buf, 64))<0)  	  return r;  	else if((s=*(unsigned short *)(buf+0)) == sec && @@ -289,6 +290,7 @@ namespace DC_Flash {  	  memcpy(dst+(s-sec)*60, buf+2, 60);  	  got=1;  	} +      }      }      return got;    } diff --git a/backends/platform/dc/icon.cpp b/backends/platform/dc/icon.cpp index cf7afc82e0..28edf27f4f 100644 --- a/backends/platform/dc/icon.cpp +++ b/backends/platform/dc/icon.cpp @@ -47,8 +47,8 @@ void Icon::create_vmicon(void *buffer)  void Icon::create_texture()  { -  static char tt[16] = { 0, 1, 4, 5, 16, 17, 20, 21, -			 64, 65, 68, 69, 80, 81, 84, 85 }; +  static unsigned char tt[16] = { 0, 1, 4, 5, 16, 17, 20, 21, +				  64, 65, 68, 69, 80, 81, 84, 85 };    unsigned short *tex = (unsigned short *)ta_txalloc(512);    unsigned short *linebase;    unsigned char *src = bitmap+sizeof(bitmap)-17; diff --git a/backends/platform/dc/input.cpp b/backends/platform/dc/input.cpp index 7b21c76efa..5c6adf6c7c 100644 --- a/backends/platform/dc/input.cpp +++ b/backends/platform/dc/input.cpp @@ -50,10 +50,10 @@ int handleInput(struct mapledev *pad, int &mouse_x, int &mouse_y,        else if (!(buttons & 512)) newkey = ' ';        else if (!(buttons & 1024)) newkey = numpadmap[(buttons>>4)&15]; -      if (!(buttons & 128)) if (inter) newkey = 1001; else mouse_x++; -      if (!(buttons & 64)) if (inter) newkey = 1002; else mouse_x--; -      if (!(buttons & 32)) if (inter) newkey = 1003; else mouse_y++; -      if (!(buttons & 16)) if (inter) newkey = 1004; else mouse_y--; +      if (!(buttons & 128)) { if (inter) newkey = 1001; else mouse_x++; } +      if (!(buttons & 64)) { if (inter) newkey = 1002; else mouse_x--; } +      if (!(buttons & 32)) { if (inter) newkey = 1003; else mouse_y++; } +      if (!(buttons & 16)) { if (inter) newkey = 1004; else mouse_y--; }        mouse_x += ((int)pad->cond.controller.joyx-128)>>4;        mouse_y += ((int)pad->cond.controller.joyy-128)>>4; @@ -157,7 +157,7 @@ int handleInput(struct mapledev *pad, int &mouse_x, int &mouse_y,      return -Common::EVENT_RBUTTONUP;    } -  if (mouse_wheel != lastwheel) +  if (mouse_wheel != lastwheel) {      if (((int8)(mouse_wheel - lastwheel)) > 0) {        lastwheel++;        return -Common::EVENT_WHEELDOWN; @@ -165,6 +165,7 @@ int handleInput(struct mapledev *pad, int &mouse_x, int &mouse_y,        --lastwheel;        return -Common::EVENT_WHEELUP;      } +  }    if (newkey && inter && newkey != lastkey) {      int transkey = inter->key(newkey, shiftFlags); diff --git a/backends/platform/dc/softkbd.h b/backends/platform/dc/softkbd.h index 8f87d12baa..27826c2744 100644 --- a/backends/platform/dc/softkbd.h +++ b/backends/platform/dc/softkbd.h @@ -40,6 +40,7 @@ class SoftKeyboard : public Interactive   public:    SoftKeyboard(const OSystem_Dreamcast *os); +  virtual ~SoftKeyboard() {}    void draw(float x, float y, int transp = 0);    int key(int k, byte &shiftFlags); | 
