mirror of
https://github.com/JanNeuendorf/SVC16.git
synced 2025-06-04 18:45:27 +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,
|
key_code: u16,
|
||||||
screen_buffer_destination: &mut Vec<u16>,
|
screen_buffer_destination: &mut Vec<u16>,
|
||||||
) -> Option<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.
|
// The clone makes the API easier and doesn't seem to be to expensive in practice.
|
||||||
*screen_buffer_destination = self.screen_buffer.clone();
|
*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.
|
// Even if no expansion is active, triggering the mechanism must still clear the utility buffer.
|
||||||
if self.expansion_triggered {
|
if self.expansion_triggered {
|
||||||
self.expansion_triggered = false;
|
self.expansion_triggered = false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user