fix(nds): input fighting
This commit is contained in:
@@ -38,7 +38,6 @@ onMounted(() => {
|
||||
? 'opacity-100 text-highlighted'
|
||||
: 'opacity-50 hover:opacity-100',
|
||||
]"
|
||||
@keydown.up.prevent="open = true"
|
||||
/>
|
||||
</template>
|
||||
|
||||
@@ -51,6 +50,8 @@ onMounted(() => {
|
||||
:step="2"
|
||||
orientation="vertical"
|
||||
color="neutral"
|
||||
@keydown.prevent
|
||||
@mouseup="($event.target as HTMLElement).blur()"
|
||||
@update:model-value="
|
||||
(v) => {
|
||||
app.settings.volume = (v ?? 100) / 100;
|
||||
|
||||
@@ -13,12 +13,10 @@ export const useKeyDown = (callback: KeyDownCallback) => {
|
||||
if (app.lagDetected) return;
|
||||
|
||||
const ndsButton = mapCodeToNDS(event.code);
|
||||
if (
|
||||
ndsButton &&
|
||||
document.activeElement &&
|
||||
document.activeElement !== document.body
|
||||
)
|
||||
return;
|
||||
if (ndsButton && document.activeElement && document.activeElement !== document.body) {
|
||||
(document.activeElement as HTMLElement).blur();
|
||||
}
|
||||
|
||||
callback({
|
||||
key: ndsButton ? `NDS_${ndsButton}` : event.key,
|
||||
ndsButton,
|
||||
|
||||
@@ -68,7 +68,7 @@ export const useAppStore = defineStore("app", {
|
||||
setRenderingMode(mode: Settings["renderingMode"]) {
|
||||
this.ready = mode === "2d";
|
||||
this.settings.renderingMode = mode;
|
||||
if (mode === "3d") this.lagDetected = false;
|
||||
this.lagDetected = false;
|
||||
this.save();
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user