mirror of
https://github.com/libretro/Mesen.git
synced 2024-11-27 11:00:50 +00:00
Input: Fixed extra frame of input lag
This commit is contained in:
parent
31c6d229fa
commit
a0a6d89416
@ -88,7 +88,7 @@ KeyMappingSet EmulationSettings::_controllerKeys[4] = { KeyMappingSet(), KeyMapp
|
||||
bool EmulationSettings::_needControllerUpdate = false;
|
||||
uint32_t EmulationSettings::_zapperDetectionRadius = 0;
|
||||
std::unordered_map<int, double> EmulationSettings::_mouseSensitivity;
|
||||
int32_t EmulationSettings::_inputPollScanline = 240;
|
||||
int32_t EmulationSettings::_inputPollScanline = 241;
|
||||
|
||||
uint32_t EmulationSettings::_defaultPpuPalette[64] = { /* 2C02 */ 0xFF666666, 0xFF002A88, 0xFF1412A7, 0xFF3B00A4, 0xFF5C007E, 0xFF6E0040, 0xFF6C0600, 0xFF561D00, 0xFF333500, 0xFF0B4800, 0xFF005200, 0xFF004F08, 0xFF00404D, 0xFF000000, 0xFF000000, 0xFF000000, 0xFFADADAD, 0xFF155FD9, 0xFF4240FF, 0xFF7527FE, 0xFFA01ACC, 0xFFB71E7B, 0xFFB53120, 0xFF994E00, 0xFF6B6D00, 0xFF388700, 0xFF0C9300, 0xFF008F32, 0xFF007C8D, 0xFF000000, 0xFF000000, 0xFF000000, 0xFFFFFEFF, 0xFF64B0FF, 0xFF9290FF, 0xFFC676FF, 0xFFF36AFF, 0xFFFE6ECC, 0xFFFE8170, 0xFFEA9E22, 0xFFBCBE00, 0xFF88D800, 0xFF5CE430, 0xFF45E082, 0xFF48CDDE, 0xFF4F4F4F, 0xFF000000, 0xFF000000, 0xFFFFFEFF, 0xFFC0DFFF, 0xFFD3D2FF, 0xFFE8C8FF, 0xFFFBC2FF, 0xFFFEC4EA, 0xFFFECCC5, 0xFFF7D8A5, 0xFFE4E594, 0xFFCFEF96, 0xFFBDF4AB, 0xFFB3F3CC, 0xFFB5EBF2, 0xFFB8B8B8, 0xFF000000, 0xFF000000 };
|
||||
|
||||
|
@ -1046,7 +1046,6 @@ void PPU::SendFrame()
|
||||
|
||||
void PPU::BeginVBlank()
|
||||
{
|
||||
SendFrame();
|
||||
TriggerNmi();
|
||||
}
|
||||
|
||||
@ -1078,7 +1077,6 @@ void PPU::Exec()
|
||||
_cycle = 0;
|
||||
if(++_scanline > _vblankEnd) {
|
||||
_lastUpdatedPixel = -1;
|
||||
_frameCount++;
|
||||
_scanline = -1;
|
||||
UpdateMinimumDrawCycles();
|
||||
}
|
||||
@ -1095,6 +1093,9 @@ void PPU::Exec()
|
||||
if(_scanline == -1) {
|
||||
_statusFlags.SpriteOverflow = false;
|
||||
_statusFlags.Sprite0Hit = false;
|
||||
} else if(_scanline == 240) {
|
||||
_frameCount++;
|
||||
SendFrame();
|
||||
} else if(_scanline == _nmiScanline) {
|
||||
BeginVBlank();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user