File tree 4 files changed +39
-1
lines changed
frontend/screens/Settings/components
4 files changed +39
-1
lines changed Original file line number Diff line number Diff line change 320
320
},
321
321
"gamemode" : " Feral GameMode applies automatic and temporary tweaks to the system when running games. Enabling may improve performance." ,
322
322
"gamescope" : {
323
+ "additionalOptions" : " Additional commandline flags to pass into gamescope." ,
323
324
"fpsLimiter" : " The amount of frames gamescope should limit to. E.g. 60" ,
324
325
"fpsLimiterNoFocus" : " The frame rate limit gamescope should limit per second if the game is not focused." ,
325
326
"gameHeight" : " The height resolution used by the game. A 16:9 aspect ratio is assumed by gamescope." ,
502
503
"title" : " Game Arguments (To run after the command):"
503
504
},
504
505
"gamescope" : {
506
+ "additionalOptions" : " Additional Options" ,
505
507
"borderless" : " Borderless" ,
506
508
"fpsLimiter" : " FPS Limiter" ,
507
509
"fpsLimiterNoFocus" : " FPS Limiter (No Focus)" ,
Original file line number Diff line number Diff line change @@ -214,6 +214,10 @@ async function prepareLaunch(
214
214
}
215
215
}
216
216
217
+ gameScopeCommand . push (
218
+ ...shlex . split ( gameSettings . gamescope . additionalOptions ?? '' )
219
+ )
220
+
217
221
// Note: needs to be the last option
218
222
gameScopeCommand . push ( '--' )
219
223
}
Original file line number Diff line number Diff line change @@ -751,6 +751,7 @@ interface GameScopeSettings {
751
751
upscaleMethod : string
752
752
fpsLimiter : string
753
753
fpsLimiterNoFocus : string
754
+ additionalOptions : string
754
755
}
755
756
756
757
export type InstallInfo =
Original file line number Diff line number Diff line change @@ -25,11 +25,16 @@ const Gamescope = () => {
25
25
upscaleWidth : '' ,
26
26
upscaleMethod : 'fsr' ,
27
27
fpsLimiter : '' ,
28
- fpsLimiterNoFocus : ''
28
+ fpsLimiterNoFocus : '' ,
29
+ additionalOptions : ''
29
30
} )
30
31
const [ fetching , setFetching ] = useState ( true )
31
32
const [ isInstalled , setIsInstalled ] = useState ( false )
32
33
34
+ const [ additionalOptions , setAdditionalOptions ] = useState (
35
+ gamescope . additionalOptions
36
+ )
37
+
33
38
useEffect ( ( ) => {
34
39
setFetching ( true )
35
40
window . api
@@ -356,6 +361,32 @@ const Gamescope = () => {
356
361
/>
357
362
</ div >
358
363
) }
364
+ { /* Additional Options */ }
365
+ < TextInputField
366
+ label = { t ( 'options.gamescope.additionalOptions' , 'Additional Options' ) }
367
+ htmlId = "additionalOptions"
368
+ placeholder = ""
369
+ value = { additionalOptions }
370
+ afterInput = {
371
+ < FontAwesomeIcon
372
+ className = "helpIcon"
373
+ icon = { faCircleInfo }
374
+ title = { t (
375
+ 'help.gamescope.additionalOptions' ,
376
+ 'Additional commandline flags to pass into gamescope.'
377
+ ) }
378
+ />
379
+ }
380
+ onChange = { ( event : ChangeEvent < HTMLInputElement > ) => {
381
+ setAdditionalOptions ( event . currentTarget . value )
382
+ } }
383
+ onBlur = { ( event : ChangeEvent < HTMLInputElement > ) =>
384
+ setGamescope ( {
385
+ ...gamescope ,
386
+ additionalOptions : event . currentTarget . value
387
+ } )
388
+ }
389
+ />
359
390
</ div >
360
391
)
361
392
}
You can’t perform that action at this time.
0 commit comments