Mouse screen coordinates calculation fix for NTSC 2X video scaler. Fixes issue #409 for the Qt GUI.

This commit is contained in:
mjbudd77 2021-10-09 18:31:20 -04:00
parent 5c4d3be30b
commit 80b36379e7
1 changed files with 10 additions and 1 deletions

View File

@ -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);