mirror of
https://github.com/JanNeuendorf/SVC16.git
synced 2025-06-03 01:50:18 +00:00
Don't write position/key codes to memory when sync was not called (#16)
Co-authored-by: Jeremy Sawicki <3847496+jeremysawicki@users.noreply.github.com>
This commit is contained in:
parent
fdea26ae7a
commit
fea7c69aff
@ -86,10 +86,12 @@ impl Engine {
|
||||
key_code: u16,
|
||||
screen_buffer_destination: &mut Vec<u16>,
|
||||
) -> Option<Vec<u16>> {
|
||||
self.sync_called = false;
|
||||
// The clone makes the API easier and doesn't seem to be to expensive in practice.
|
||||
*screen_buffer_destination = self.screen_buffer.clone();
|
||||
self.set_input(pos_code, key_code);
|
||||
if self.sync_called {
|
||||
self.sync_called = false;
|
||||
self.set_input(pos_code, key_code);
|
||||
}
|
||||
// Even if no expansion is active, triggering the mechanism must still clear the utility buffer.
|
||||
if self.expansion_triggered {
|
||||
self.expansion_triggered = false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user