File tree Expand file tree Collapse file tree 5 files changed +48
-8
lines changed
src/frontend/screens/Settings/sections Expand file tree Collapse file tree 5 files changed +48
-8
lines changed Original file line number Diff line number Diff line change 827
827
"open-config-file" : " Open Config File" ,
828
828
"reset-heroic" : " Reset Heroic" ,
829
829
"saves" : {
830
+ "gog_linux_native_warning" : " Linux native games do not support GOG's Cloud Saves feature. Use the Windows version instead." ,
831
+ "not_supported" : " This game does not support Cloud Saves." ,
830
832
"warning" : " Cloud Saves feature is in Beta, please backup your saves before syncing (in case something goes wrong)"
831
833
},
832
834
"systemInformation" : {
Original file line number Diff line number Diff line change @@ -78,8 +78,8 @@ export default function GamesSettings() {
78
78
const isWin = platform === 'win32'
79
79
const isMac = platform === 'darwin'
80
80
const isCrossover = wineVersion ?. type === 'crossover'
81
- const hasCloudSaves =
82
- gameInfo ?. cloud_save_enabled && gameInfo . install . platform !== 'linux '
81
+ const showCloudSavesTab =
82
+ gameInfo ?. runner === 'gog' || gameInfo ?. runner === 'legendary '
83
83
const isBrowserGame = gameInfo ?. install . platform === 'Browser'
84
84
const isSideloaded = gameInfo ?. runner === 'sideload'
85
85
@@ -157,7 +157,7 @@ export default function GamesSettings() {
157
157
value = "advanced"
158
158
/>
159
159
160
- { hasCloudSaves && (
160
+ { showCloudSavesTab && (
161
161
< Tab
162
162
label = { t ( 'settings.navbar.sync' , 'Cloud Saves Sync' ) }
163
163
value = "saves"
Original file line number Diff line number Diff line change @@ -21,14 +21,18 @@ interface Props {
21
21
autoSyncSaves : boolean
22
22
setAutoSyncSaves : ( value : boolean ) => void
23
23
syncCommands : { name : string ; value : string } [ ]
24
+ featureSupported : boolean
25
+ isLinuxNative : boolean
24
26
}
25
27
26
28
export default function GOGSyncSaves ( {
27
29
gogSaves,
28
30
setGogSaves,
29
31
autoSyncSaves,
30
32
setAutoSyncSaves,
31
- syncCommands
33
+ syncCommands,
34
+ featureSupported,
35
+ isLinuxNative
32
36
} : Props ) {
33
37
const [ isLoading , setIsLoading ] = useState ( true )
34
38
const [ isSyncing , setIsSyncing ] = useState ( false )
@@ -67,7 +71,7 @@ export default function GOGSyncSaves({
67
71
setIsSyncing ( false )
68
72
setIsLoading ( false )
69
73
}
70
- getLocations ( )
74
+ if ( featureSupported && ! isLinuxNative ) getLocations ( )
71
75
} , [ retry ] )
72
76
73
77
const handleRetry = ( ) => {
@@ -88,6 +92,24 @@ export default function GOGSyncSaves({
88
92
setIsSyncing ( false )
89
93
}
90
94
95
+ if ( isLinuxNative || ! featureSupported ) {
96
+ return (
97
+ < div style = { { color : 'red' } } >
98
+ { isLinuxNative &&
99
+ t (
100
+ 'settings.saves.gog_linux_native_warning' ,
101
+ "Linux native games do not support GOG's Cloud Saves feature. Use the Windows version instead."
102
+ ) }
103
+ < br />
104
+ { ! featureSupported &&
105
+ t (
106
+ 'settings.saves.not_supported' ,
107
+ 'Cloud Saves are not supported by this game.'
108
+ ) }
109
+ </ div >
110
+ )
111
+ }
112
+
91
113
return (
92
114
< >
93
115
{ manuallyOutputShow && (
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ import LegendarySyncSaves from './legendary'
9
9
10
10
const SyncSaves = ( ) => {
11
11
const { t } = useTranslation ( )
12
- const { runner } = useContext ( SettingsContext )
12
+ const { runner, gameInfo } = useContext ( SettingsContext )
13
13
const { platform } = useContext ( ContextProvider )
14
14
const isWin = platform === 'win32'
15
15
@@ -32,6 +32,7 @@ const SyncSaves = () => {
32
32
if ( runner === 'legendary' ) {
33
33
return (
34
34
< LegendarySyncSaves
35
+ featureSupported = { ! ! gameInfo ?. cloud_save_enabled }
35
36
savesPath = { savesPath }
36
37
setSavesPath = { setSavesPath }
37
38
autoSyncSaves = { autoSyncSaves }
@@ -46,6 +47,8 @@ const SyncSaves = () => {
46
47
if ( runner === 'gog' ) {
47
48
return (
48
49
< GOGSyncSaves
50
+ featureSupported = { ! ! gameInfo ?. cloud_save_enabled }
51
+ isLinuxNative = { gameInfo ?. install . platform === 'linux' }
49
52
gogSaves = { gogSavesLocations }
50
53
setGogSaves = { setGogSavesLocations }
51
54
autoSyncSaves = { autoSyncSaves }
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ interface Props {
23
23
setSavesPath : ( value : string ) => void
24
24
winePrefix ?: string
25
25
syncCommands : { name : string ; value : string } [ ]
26
+ featureSupported : boolean
26
27
}
27
28
28
29
export default function LegendarySyncSaves ( {
@@ -32,7 +33,8 @@ export default function LegendarySyncSaves({
32
33
setAutoSyncSaves,
33
34
isProton,
34
35
winePrefix,
35
- syncCommands
36
+ syncCommands,
37
+ featureSupported
36
38
} : Props ) {
37
39
const [ isSyncing , setIsSyncing ] = useState ( false )
38
40
const [ isLoading , setLoading ] = useState ( false )
@@ -60,7 +62,7 @@ export default function LegendarySyncSaves({
60
62
setLoading ( false )
61
63
setRetry ( false )
62
64
}
63
- setDefaultSaveFolder ( )
65
+ if ( featureSupported ) setDefaultSaveFolder ( )
64
66
} , [ winePrefix , isProton , retry ] )
65
67
66
68
async function handleSync ( ) {
@@ -75,6 +77,17 @@ export default function LegendarySyncSaves({
75
77
setIsSyncing ( false )
76
78
}
77
79
80
+ if ( ! featureSupported ) {
81
+ return (
82
+ < div style = { { color : 'red' } } >
83
+ { t (
84
+ 'settings.saves.not_supported' ,
85
+ 'This game does not support Cloud Saves.'
86
+ ) }
87
+ </ div >
88
+ )
89
+ }
90
+
78
91
return (
79
92
< >
80
93
{ manuallyOutputShow && (
You can’t perform that action at this time.
0 commit comments