Skip to content

Commit f5ce0b6

Browse files
committed
move cue-enabled to emulation settings
1 parent e6ba8f9 commit f5ce0b6

File tree

9 files changed

+12
-13
lines changed

9 files changed

+12
-13
lines changed

assets/l10n/en_US.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@
6767
"game.edit.cover-image-delete.label": "Delete cover image",
6868
"game.edit.cover-image-empty": "No cover image",
6969
"game.edit.override-settings.label": "Override emulation settings",
70-
"game.edit.cue-enabled.label": "Enable creation of .cue file",
7170
"game.edit.netplay-enabled.label": "Netplay enabled",
7271
"game.edit.netplay-require-login.label": "Require login for netplay",
7372
"game.edit.netplay-open.label": "Show in open netplay games",
@@ -228,6 +227,7 @@
228227
"settings-platform.emulation.threads.label": "Use threads",
229228
"settings-platform.emulation.disable-vsync.label": "Disable VSync",
230229
"settings-platform.emulation.disable-browser-db.label": "Disable browser DB",
230+
"settings-platform.emulation.cue-enabled.label": "Enable creation of .cue file",
231231
"settings-platform.core.title": "Core",
232232
"settings-platform.core.empty": "No options for selected core",
233233
"settings-platform.play.title": "Play",

assets/l10n/ru_RU.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@
6767
"game.edit.cover-image-delete.label": "Удалить обложку",
6868
"game.edit.cover-image-empty": "Нет обложки",
6969
"game.edit.override-settings.label": "Переопределить настройки эмуляции",
70-
"game.edit.cue-enabled.label": "Включить создание файлов .cue",
7170
"game.edit.netplay-enabled.label": "Включить сетевую игру",
7271
"game.edit.netplay-require-login.label": "Требовать вход для сетевой игры",
7372
"game.edit.netplay-open.label": "Показать в списке открытых сетевых игр",
@@ -228,6 +227,7 @@
228227
"settings-platform.emulation.threads.label": "Использовать потоки",
229228
"settings-platform.emulation.disable-vsync.label": "Отключить вертикальную синхронизацию",
230229
"settings-platform.emulation.disable-browser-db.label": "Отключить использование БД браузера",
230+
"settings-platform.emulation.cue-enabled.label": "Включить создание файлов .cue",
231231
"settings-platform.core.title": "Ядро",
232232
"settings-platform.core.empty": "Нет настроек для выбранного ядра",
233233
"settings-platform.play.title": "Игра",

storage/defaults.go

+1
Original file line numberDiff line numberDiff line change
@@ -1110,6 +1110,7 @@ func DefaultEmulatorSettings(systemType string) EmulatorSettings {
11101110
settings.Shader = Shaders[0].Value
11111111
settings.Buttons = DefaultButtons
11121112
settings.Controls = [4]EmulatorControls{controls}
1113+
settings.CueEnabled = true
11131114

11141115
return settings
11151116
}

storage/types.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ type Game struct {
4242
NetplaySessionId string
4343
NetplayRequireLogin bool
4444
NetplayOpen bool
45-
CueEnabled bool
4645
AutoSaveEnabled bool
4746
AutoSaveInterval int
4847
AutoSaveCapacity int
@@ -90,6 +89,7 @@ type EmulatorSettings struct {
9089
Threads bool
9190
DisableBrowserDB bool
9291
DisableVSync bool
92+
CueEnabled bool
9393
}
9494

9595
type EmulatorControls struct {

templates/includes/form_game.twig

-7
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,6 @@
5454
</div>
5555
</div>
5656

57-
<div class="mb-3">
58-
<div class="form-check form-switch">
59-
<input type="checkbox" id="cue-enabled" name="cue-enabled" class="form-check-input" value="1" {% if game.CueEnabled %}checked{% endif %}>
60-
<label for="cue-enabled">{{ loc("game.edit.cue-enabled.label") }}</label>
61-
</div>
62-
</div>
63-
6457
{% if netplay_enabled %}
6558
<div class="mb-3">
6659
<div class="form-check form-switch">

templates/includes/platform_settings/emulation.twig

+6
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,11 @@
3333
<input type="checkbox" id="disable-browser-db" name="disable-browser-db" class="form-check-input" value="1" {% if settings.DisableBrowserDB %}checked{% endif %}>
3434
<label for="disable-browser-db">{{ loc("settings-platform.emulation.disable-browser-db.label") }}</label>
3535
</div>
36+
<div class="mb-3">
37+
<div class="form-check form-switch">
38+
<input type="checkbox" id="cue-enabled" name="cue-enabled" class="form-check-input" value="1" {% if settings.CueEnabled %}checked{% endif %}>
39+
<label for="cue-enabled">{{ loc("settings-platform.emulation.cue-enabled.label") }}</label>
40+
</div>
41+
</div>
3642
</div>
3743
</div>

templates/play.twig

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
window.EJS_disableDatabases = true;
8686
{% endif %}
8787
88-
{% if not game.CueEnabled %}
88+
{% if not emulator_settings.CueEnabled %}
8989
window.EJS_disableCue = true;
9090
{% endif %}
9191

web/handlers_game.go

-2
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ func (s *Server) gameUpload(c echo.Context) error {
6666
OriginalFileExtension: getFileExtension(file.Filename),
6767
OriginalFileSize: file.Size,
6868
Platform: "",
69-
CueEnabled: true,
7069
AutoSaveEnabled: false,
7170
AutoSaveInterval: 5 * 60,
7271
AutoSaveCapacity: 10,
@@ -177,7 +176,6 @@ func (s *Server) gameEditSubmit(c echo.Context) error {
177176
game.Name = c.FormValue("name")
178177
game.Description = c.FormValue("description")
179178
game.OverrideEmulatorSettings = c.FormValue("override-settings") == "1"
180-
game.CueEnabled = c.FormValue("cue-enabled") == "1"
181179
game.NetplayEnabled = c.FormValue("netplay-enabled") == "1"
182180
game.NetplayRequireLogin = c.FormValue("netplay-require-login") == "1"
183181
game.NetplayOpen = c.FormValue("netplay-open") == "1"

web/handlers_settings.go

+1
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,7 @@ func settingsCollectFormData(c echo.Context) storage.EmulatorSettings {
204204
Threads: c.FormValue("threads") == "1",
205205
DisableBrowserDB: c.FormValue("disable-browser-db") == "1",
206206
DisableVSync: c.FormValue("disable-vsync") == "1",
207+
CueEnabled: c.FormValue("cue-enabled") == "1",
207208
Buttons: buttons,
208209
Controls: settingsCollectControls(c),
209210
CoreOptions: coreOptionsValues,

0 commit comments

Comments
 (0)