Skip to content

Commit

Permalink
chore: support for tuning display frequency
Browse files Browse the repository at this point in the history
  • Loading branch information
joamag committed Jul 15, 2024
1 parent 02fd8a8 commit afc2d3d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions frontends/web/ts/gb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,7 @@ export class GameboyEmulator extends EmulatorLogic implements Emulator {
...(this.extraSettings?.debug ?? false
? [
Feature.LoopMode,
Feature.DisplayFrequency,
Feature.BootRomInfo,
Feature.RomTypeInfo,
Feature.Cyclerate,
Expand Down Expand Up @@ -592,6 +593,16 @@ export class GameboyEmulator extends EmulatorLogic implements Emulator {
this.trigger("frequency", value);
}

get displayFrequency(): number {
return this.visualFrequency;
}

set displayFrequency(value: number) {
value = Math.max(value, 0);
this.visualFrequency = value;
this.trigger("display-frequency", value);
}

get frequencySpecs(): FrequencySpecs {
return {
unit: Frequency.MHz,
Expand Down

0 comments on commit afc2d3d

Please sign in to comment.