Fix yscale out of bounds rounding error (#12)

* Fix rounding error causing yscale out of bounds
* Ignore linux build output
This commit is contained in:
Chris Broome 2018-06-19 21:42:07 -04:00 committed by Brad Smith
parent 4c3b96aefb
commit d3cc7f0ba7
3 changed files with 12 additions and 2 deletions

10
.gitignore vendored
View File

@ -23,3 +23,13 @@
/output/sav/*.sav
/output/fcs/*.fc*
/vc/userconfig/scmrev.h
# linux build output
bin
src/fceux
fceux-net-server
*.o
.sconf_temp/
.sconsign.dblite
.deps
.dirstamp

View File

@ -174,7 +174,7 @@ int InitVideo(FCEUGI *gi)
#ifdef OPENGL
if( (usingogl && !_stretchy) || !usingogl)
#endif
if(_yres<tlines*eys || eys <= 0.01)
if(_yres < (int)(tlines*eys) || eys <= 0.01)
{
FCEUD_PrintError("yscale out of bounds.");
KillVideo();

View File

@ -319,7 +319,7 @@ InitVideo(FCEUGI *gi)
#ifdef OPENGL
if((s_useOpenGL && !ystretch) || !s_useOpenGL)
#endif
if(yres < s_tlines * s_eys || s_eys <= 0.01) {
if(yres < int(s_tlines * s_eys) || s_eys <= 0.01) {
FCEUD_PrintError("yscale out of bounds.");
KillVideo();
return -1;