mirror of
				https://github.com/smartfrigde/armcord.git
				synced 2024-08-14 23:56:58 +00:00 
			
		
		
		
	Comment out any Linux and Wayland checks (#356)
* Redo the Wayland checks for Linux * Update the Wayland window decorations comments * Nit: don't nest if checks, update some comments * Nit: stricter env var checks * toLowerCase() on Wayland/Linux string checks * Use toLowerCase() properly Co-authored-by: Ven <vendicated@riseup.net> * Don't use toLowerCase() on XDG_SESSION_TYPE * Null safety for XDG_SESSION_TYPE and toLowerCase * Change how appendSwitch is used * Forgot the quotes * When the platform is Linux, it will always be lowercase Co-authored-by: unlwly <x57luw@gmail.com> * Comment out any Linux and Wayland checks They were nonfunctioning anyways. --------- Co-authored-by: Ven <vendicated@riseup.net> Co-authored-by: unlwly <x57luw@gmail.com>
This commit is contained in:
		
							parent
							
								
									be67ca3533
								
							
						
					
					
						commit
						b42e4d91ea
					
				
					 1 changed files with 19 additions and 14 deletions
				
			
		
							
								
								
									
										33
									
								
								src/main.ts
									
										
									
									
									
								
							
							
						
						
									
										33
									
								
								src/main.ts
									
										
									
									
									
								
							|  | @ -25,21 +25,26 @@ if (!app.requestSingleInstanceLock()) { | ||||||
| } else { | } else { | ||||||
|     // Your data now belongs to CCP
 |     // Your data now belongs to CCP
 | ||||||
|     crashReporter.start({uploadToServer: false}); |     crashReporter.start({uploadToServer: false}); | ||||||
|     if (process.env.USE_WAYLAND == "0") { |     /* Using appendSwitch properly causes ArmCord to segfault, | ||||||
|         console.log("Wayland patches disabled."); |        So we will leave the responsibility of enabling Wayland | ||||||
|     } else { |        And PipeWire video capture to packagers. | ||||||
|         if (process.platform == "linux") { |     // We use toLowerCase to account for desktops where XDG_SESSION_TYPE might be Wayland and not wayland.
 | ||||||
|             if (process.env.XDG_SESSION_TYPE == "wayland") { |     if (process.platform === "linux" && process.env.XDG_SESSION_TYPE?.toLowerCase() === "wayland") { | ||||||
|                 console.log("Wayland specific patches applied."); |             // Just using the native Wayland backend doesn't enable PipeWire capture, we need to enable it explicitly.
 | ||||||
|                 app.commandLine.appendSwitch("ozone-platform=wayland"); |             app.commandLine.appendSwitch("enable-features=WebRTCPipeWireCapturer"); | ||||||
|                 if (process.env.XDG_CURRENT_DESKTOP == "GNOME") { |             console.log("Wayland detected, using PipeWire for video capture."); | ||||||
|                     app.commandLine.appendSwitch("enable-features=UseOzonePlatform,WaylandWindowDecorations"); |             // Some people might want to disable the Wayland backend for one reason or another, such as for Wayland-specific bugs.
 | ||||||
|                 } else { |             if (process.env.USE_WAYLAND === "0") { | ||||||
|                     app.commandLine.appendSwitch("enable-features=UseOzonePlatform"); |                 console.log("Wayland backend disabled."); | ||||||
|                 } |             } else { | ||||||
|             } |                 console.log("Using native Wayland, not Xwayland. Disable with USE_WAYLAND=0 if you find issues."); | ||||||
|  |                 app.commandLine.appendSwitch("ozone-platform=auto"); | ||||||
|  |                 // The Wayland spec doesn't require SSDs, so lets enable self-drawn window decorations. 
 | ||||||
|  |                 // If SSDs are supported on the compositor, Electron will let the compositor handle the decorations.
 | ||||||
|  |                 app.commandLine.appendSwitch("enable-features=UseOzonePlatform,WaylandWindowDecorations"); | ||||||
|  |               } | ||||||
|         } |         } | ||||||
|     } |     */ | ||||||
| 
 | 
 | ||||||
|     checkForDataFolder(); |     checkForDataFolder(); | ||||||
|     checkIfConfigExists(); |     checkIfConfigExists(); | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue