Mouse screen coordinates calculation fix for NTSC 2X video scaler. Fixes issue #409 for the Qt GUI.
This commit is contained in:
parent
5c4d3be30b
commit
80b36379e7
|
@ -494,8 +494,17 @@ void FCEUI_AviVideoUpdate(const unsigned char* buffer)
|
|||
uint32 PtoV(double nx, double ny)
|
||||
{
|
||||
int x, y;
|
||||
|
||||
y = (int)( ny * (double)nes_shm->video.nrow );
|
||||
x = (int)( nx * (double)nes_shm->video.ncol );
|
||||
|
||||
if ( nes_shm->video.preScaler == 3 )
|
||||
{
|
||||
x = (int)( nx * (double)nes_shm->video.ncol * (256.0/301.0) );
|
||||
}
|
||||
else
|
||||
{
|
||||
x = (int)( nx * (double)nes_shm->video.ncol );
|
||||
}
|
||||
|
||||
//printf("Scaled (%i,%i) \n", x, y);
|
||||
|
||||
|
|
Loading…
Reference in New Issue