Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions apphost.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@ namespace microcode {
export const UI_SCREEN_WIDTH = 160
export const UI_SCREEN_HEIGHT = 120

/**
* Milliseconds a controller button is held before repeat events start.
*/
const CONTROLLER_REPEAT_DELAY_MS = 200

/**
* Milliseconds between controller button repeat events.
*/
const CONTROLLER_REPEAT_INTERVAL_MS = 40

class AppAssetResolver implements ui.UiAssetResolver {
public getBitmap(
id: string | number,
Expand Down Expand Up @@ -35,6 +45,10 @@ namespace microcode {
new ui.DisplayShieldFrameAdapter(),
new AppAssetResolver(),
)
controller.setRepeatDefault(
CONTROLLER_REPEAT_DELAY_MS,
CONTROLLER_REPEAT_INTERVAL_MS,
)
}

/**
Expand Down
Loading