Skip to content

Commit c2061bf

Browse files
committed
Warn
1 parent 3da3e19 commit c2061bf

File tree

1 file changed

+26
-2
lines changed

1 file changed

+26
-2
lines changed

app.js

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ let electron = require('electron'),
66
/*electron_reload = require('electron-reload')(__dirname, {
77
ignored: /node_modules|[\/\\]\.|cemui.log|cemui.error.log|cemui.info.log/
88
}),*/
9+
os = require('os'),
910
NodeNUSRipper = require('./NodeNUSRipper.js'),
1011
NUSRipper = new NodeNUSRipper(),
1112
exec = require('child_process').exec,
@@ -372,7 +373,9 @@ app.on('ready', () => {
372373
} else {
373374
update_cache_version = false;
374375
setupDefaults();
375-
setWindow();
376+
checkSystem(() => {
377+
setWindow();
378+
});
376379
}
377380
});
378381
});
@@ -1907,7 +1910,7 @@ function createShortcut(emulator, id) {
19071910
rom = game.path + '/code/' + game.rom;
19081911
}
19091912

1910-
ws.create(require('os').homedir() + '/Desktop/' + game.name_clean + ' (' + emulator + ').lnk', {
1913+
ws.create(os.homedir() + '/Desktop/' + game.name_clean + ' (' + emulator + ').lnk', {
19111914
target : cemu.cemu_path,
19121915
args: '-g "' + rom + '"',
19131916
icon: DATA_ROOT + 'cache/images/' + id + '/icon.ico',
@@ -2074,6 +2077,7 @@ function setupDefaults() {
20742077
setupDefaultFiles();
20752078

20762079
let settings_defaults = {
2080+
show_warning_popups: true,
20772081
cemu_paths: [],
20782082
game_paths: [],
20792083
theme: 'Flux',
@@ -2133,6 +2137,26 @@ function verifyCacheVersion(cb) {
21332137
}
21342138
}
21352139

2140+
function checkSystem(cb) {
2141+
if (new RegExp('\\bIntel\\b').test(os.cpus()[0].model)) {
2142+
dialog.showMessageBox(ApplicationWindow, {
2143+
type: 'warning',
2144+
title: 'Warning',
2145+
message: 'Unsupported GPU',
2146+
detail: 'CemUI has detected an Intel GPU. Cemu does not currently support Intel GPUs. You will experience many bugs and glitches using Cemu'
2147+
});
2148+
}
2149+
if (os.platform() != 'Windows_NT') {
2150+
dialog.showMessageBox(ApplicationWindow, {
2151+
type: 'warning',
2152+
title: 'Warning',
2153+
message: 'Unsupported OS',
2154+
detail: 'CemUI, and Cemu, only offically supports Windows machines. We have detected you running on ' + os.platform() + '. Some features may not work properly'
2155+
});
2156+
}
2157+
return cb();
2158+
}
2159+
21362160
Array.prototype.contains = function(el) {
21372161
return this.indexOf(el) > -1;
21382162
}

0 commit comments

Comments
 (0)