Skip to content

Commit

Permalink
mg
Browse files Browse the repository at this point in the history
  • Loading branch information
lacymorrow committed Jun 3, 2023
2 parents 4820565 + db4f944 commit 709a7e5
Show file tree
Hide file tree
Showing 10 changed files with 51 additions and 13 deletions.
15 changes: 15 additions & 0 deletions .hintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"extends": [
"development"
],
"hints": {
"compat-api/css": [
"default",
{
"ignore": [
"user-select"
]
}
]
}
}
4 changes: 4 additions & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
<<<<<<< HEAD
12 || 14 || 16 || 18
=======
14.17.4 || 16 || 18
>>>>>>> master
3 changes: 3 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,8 @@ M1 Mac security fix: (_thanks [Yoyopizzacat, #207](https://github.com/lacymorrow

_The AppImage needs to be [made executable](http://discourse.appimage.org/t/how-to-make-an-appimage-executable/80) after download._

_Certain lightweight desktop environments may require a compositor to allow CrossOver to work correctly ([#230](https://github.com/lacymorrow/crossover/issues/230))._

###### _Further instructions for [Windows](https://www.techjunkie.com/windows-protected-your-pc-disable-smartscreen/) and [Mac](https://support.apple.com/en-us/HT202491)_

<p align="center">
Expand Down Expand Up @@ -393,6 +395,7 @@ Once in-game, pressing space should put the crosshair over the screen, even in f

Check your desktop environment. CrossOver may not work on KDE, try GNOME if you experience issues.

CrossOver behaves weirdly if your desktop is missing a compositor ([#230](https://github.com/lacymorrow/crossover/issues/230)). Try installing one to see if that resolves the issue.

## Debugging

Expand Down
1 change: 0 additions & 1 deletion src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ const start = async () => {
// require( 'electron-reloader' )( module )
// } catch {}

//
// Const contextMenu = require('electron-context-menu')
// contextMenu()

Expand Down
10 changes: 10 additions & 0 deletions src/main/crossover.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const keyboard = require( './keyboard' )
const log = require( './log' )
const save = require( './save' )
const set = require( './set' )
const tray = require( './tray' )
const sound = require( './sound' )
const windows = require( './windows' )
const reset = require( './reset' )
Expand All @@ -16,6 +17,15 @@ const preferences = Preferences.init()

let previousPreferences = preferences.preferences

// Remove tray in Linux to fully quit
app.on( 'before-quit', _ => {

// https://electronjs.org/docs/api/app#event-before-quit
// https://electronjs.org/docs/api/tray#traydestroy
tray.instance?.destroy()

} )

const quit = () => app.quit()

const changeCrosshair = src => windows.each( win => set.crosshair( src, win ) )
Expand Down
4 changes: 2 additions & 2 deletions src/main/iohook.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ const hideOnMouse = async () => {

if ( event.button === mouseButton ) {

windows.hideWindow()
set.rendererProperties( { '--crosshair-opacity': '0' }, windows.win )

}

Expand All @@ -83,7 +83,7 @@ const hideOnMouse = async () => {

if ( event.button === mouseButton ) {

windows.showWindow()
set.rendererProperties( { '--crosshair-opacity': '100' }, windows.win )

}

Expand Down
9 changes: 8 additions & 1 deletion src/main/preferences.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ const preferencesConfig = {
browserWindowOverrides,
// Custom styles
config: {
debounce: 20,
debounce: 10,
},
css: 'src/renderer/styles/dist/preferences.css',
dataStore: path.resolve( app.getPath( 'userData' ), 'preferences.json' ),
Expand Down Expand Up @@ -489,6 +489,13 @@ const preferencesConfig = {
options: [ { label: 'Enable hardware acceleration', value: 'gpu' } ],
help: 'If you are having issues with FPS, try disabling hardware acceleration. You must restart CrossOver for this to take effect.',
},
{
label: 'Render GPU using browser',
key: 'gpu',
type: 'checkbox',
options: [ { label: 'This switch runs the GPU process in the same process as the browser', value: 'gpu' } ],
help: 'This can avoid issues with , which can help avoid the issues with transparency .',
},
{
label: 'Run App On System Start',
key: 'boot',
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/styles/dist/index.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 709a7e5

Please sign in to comment.