Skip to content

Commit 5b21810

Browse files
committed
docs: initialize and format game speed generator output
1 parent fac4951 commit 5b21810

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

docs/.vitepress/theme/components/CustomGameSpeedGenerator.vue

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ type GameSpeedMatch = {
6464
6565
const { lang } = useData()
6666
const desiredFps = ref<number>(30)
67-
const highlightedCodeHtml = ref<string>('')
6867
6968
const highlighterPromise = createHighlighterCore({
7069
langs: [ini],
@@ -77,18 +76,21 @@ const localizedMessages = computed(() => {
7776
})
7877
7978
const matchingGameSpeedSettings = computed(() => {
80-
return findMatchingGameSpeedSettings(Number(desiredFps.value))
79+
return findMatchingGameSpeedSettings(desiredFps.value)
8180
})
8281
8382
const resultText = computed(() => {
8483
if (!matchingGameSpeedSettings.value.length) {
8584
return `; ${localizedMessages.value.noResults}`
8685
}
8786
88-
return matchingGameSpeedSettings.value
87+
const settings = matchingGameSpeedSettings.value
8988
.map((match, index) => formatGameSpeedMatch(match, index, localizedMessages.value.or))
9089
.join('\n')
90+
91+
return `[General]\nCustomGS=true\n;\n${settings}`
9192
})
93+
const highlightedCodeHtml = ref(escapeHtml(resultText.value))
9294
9395
const stopHighlightWatcher = watch(resultText, updateHighlightedCode, { immediate: true })
9496

0 commit comments

Comments
 (0)