mirror of
https://git.sanhost.net/sanasol/hytale-f2p
synced 2026-02-26 09:11:49 -03:00
Merge GPU preference feature branch to main branch version 2.0.2 for testing (#3)
* modernized UI for GPU Preference option * feat: auto-detect dedicated GPU on hybrid laptops (iGPU+dGPU) * feat: detailed GPU info in auto-detection feature on startup * feat: add GPU options for launcher - Add GPU preference setting (Auto/Integrated/Dedicated) - Implement Linux GPU selection with DRI_PRIME and NVIDIA env vars - Add GPU detection using Electron's app.getGPUInfo() - Update settings UI with GPU preference dropdown - Integrate GPU preference into game launch process * feat: auto-detect dedicated GPU on hybrid laptops (iGPU+dGPU) * added fallbacks to and option to use integrated GPU. * add package-lock and fix deps version * changed 'Nvidia' string to 'NVIDIA' * fix: selecting `dedicated` option while using nvidia GPU did not set its specific env variables * remove unused `CONFIG_FILE` variable on launcher core modules * fix: duplicated save-load gpu detection functions * move game option settings to the top, while custom java to the bottom * fix: settings-header margin-bottom from 3rem to 1rem and supress line-clamp warning
This commit is contained in:
@@ -365,6 +365,41 @@
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="settings-input-group">
|
||||
<label class="settings-input-label">GPU Preference</label>
|
||||
<div class="segmented-control">
|
||||
<input type="radio" id="gpu-auto" name="gpuPreference" value="auto" checked>
|
||||
<label for="gpu-auto">Auto</label>
|
||||
<input type="radio" id="gpu-integrated" name="gpuPreference" value="integrated">
|
||||
<label for="gpu-integrated">Integrated</label>
|
||||
<input type="radio" id="gpu-dedicated" name="gpuPreference" value="dedicated">
|
||||
<label for="gpu-dedicated">Dedicated</label>
|
||||
</div>
|
||||
<p class="settings-hint">
|
||||
<i class="fas fa-info-circle"></i>
|
||||
Select your preferred GPU (Linux: affects DRI_PRIME)
|
||||
</p>
|
||||
<div id="gpu-detection-info" class="gpu-detection-info"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="settings-section">
|
||||
<h3 class="settings-section-title">
|
||||
<i class="fab fa-discord"></i>
|
||||
Discord Integration
|
||||
</h3>
|
||||
|
||||
<div class="settings-option">
|
||||
<label class="settings-checkbox">
|
||||
<input type="checkbox" id="discordRPCCheck" checked />
|
||||
<span class="checkmark"></span>
|
||||
<div class="checkbox-content">
|
||||
<div class="checkbox-title">Enable Discord Rich Presence</div>
|
||||
<div class="checkbox-description">Show your launcher activity on Discord</div>
|
||||
</div>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="settings-section">
|
||||
@@ -406,6 +441,48 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="settings-section">
|
||||
<h3 class="settings-section-title">
|
||||
<i class="fas fa-coffee"></i>
|
||||
Java Runtime
|
||||
</h3>
|
||||
|
||||
<div class="settings-option">
|
||||
<label class="settings-checkbox">
|
||||
<input type="checkbox" id="customJavaCheck" />
|
||||
<span class="checkmark"></span>
|
||||
<div class="checkbox-content">
|
||||
<div class="checkbox-title">Use Custom Java Path</div>
|
||||
<div class="checkbox-description">Override the bundled Java runtime with your own installation</div>
|
||||
</div>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div id="customJavaOptions" class="custom-java-options" style="display: none;">
|
||||
<div class="settings-input-group">
|
||||
<label class="settings-input-label">Java Executable Path</label>
|
||||
<div class="settings-input-with-button">
|
||||
<input
|
||||
type="text"
|
||||
id="customJavaPath"
|
||||
class="settings-input"
|
||||
placeholder="Select Java path..."
|
||||
readonly
|
||||
/>
|
||||
<button id="browseJavaBtn" class="settings-browse-btn">
|
||||
<i class="fas fa-folder-open"></i>
|
||||
Browse
|
||||
</button>
|
||||
</div>
|
||||
<p class="settings-hint">
|
||||
<i class="fas fa-info-circle"></i>
|
||||
Select the Java installation folder (supports Windows, Mac, Linux)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user