ValveSoftware / halflife

Half-Life 1 engine based games
Other
3.68k stars 625 forks source link

[Feature Request] Add a new Display Mode "Fullscreen Borderless" #2283

Open metita opened 5 years ago

metita commented 5 years ago

More customization for the user and is a must-need on actual games.

1) Makes the game more easy to stream/record. (OBS for example) 2) Apps like Gyazo aren't working on Fullscreen 3) Windowed makes your taskbar appears 4) If you got more than 1 monitor this option rocks.

There are plenty of downside when not on Fullscreen Borderless so it might be a great addition to the game.

SamVanheer commented 5 years ago

It is already possible to use borderless window functionality by adding the -noborder command line parameter.

I recommend adding this as an option in the Video menu. Since the command line parameter exists it could be be controlled using COM_CheckParm("-noborder") || registry->ReadInt( "borderless_window", 0 ).

metita commented 5 years ago

Looks like Borderless window is not being applied correctly as using -noborder looks like the same, would like more clarity on this, as Gyazo is not working properly also and Lightshot is not working too. @mikela-valve

SamVanheer commented 5 years ago

-noborder removes the title bar for me, but i can still resize the window in windowed mode.

metita commented 5 years ago

It removes the taskbar correctly but looks like is not being applied correctly because some program that relies on capturing your window are not detecting the game. (Like OBS when using window capture)

imagen

SamVanheer commented 5 years ago

I had to close and reopen the capture settings dialog in order to select hl.exe. However it seems that Obs has issues capturing output from the game. All i can see is a white square on a black background.

Restarting without -noborder allowed me to get the main menu, but it doesn't look like it updates and the exe disappeared from the list of captures when i checked the settings.

Recordings also don't appear to show VGUI2 menus that are opened, nor any changes on the main menu like buttons being highlighted.

I found this, which says to use game capture: https://obsproject.com/forum/threads/window-capture-and-half-life.39942/

Game capture also has a window capture feature which does work with Half-Life, and will correctly record changes.

Is this a solution to your problem?

metita commented 5 years ago

Not really, OBS is just a example, there are other programs that has issues when trying to capture the game (Gyazo, Lightshot, that tries to take a screenshot of your monitor or a specific window) and also alt-tabbing is not instant (You can test -noborder and without -noborder and using Fullscreen)

Can confirm Game capture works.

SamVanheer commented 5 years ago

Alt tabbing is instant for me both with and without border, even on the lowest available resolution. I have an SSD and a lot of memory so it might not have to do much work to tab out.

I did some searching and i found this: https://old.reddit.com/r/gamedev/comments/47zpta/sdl2_opengl_steamobs_capture_busted/?st=juwzhj8p&sh=e8d92f93

The engine sets GL_FRAMEBUFFER to 0 during startup if scaled FBO is enabled. Maybe it also needs to do this immediately prior to a swap call, i'm not sure.

metita commented 5 years ago

It seems that alt-tabbing is instant but is not, native fullscreen is a bit more instant than with -noborder. @mikela-valve would like some info on how noborder works on the game and if this feature can make his path to the game.

(Game is on SSD, i5-6600, GTX 1060 6GB, 144hz monitor tho)

surabax commented 4 months ago

This would be very useful under Wayland right now, since there is severe flickering in Fullscreen that is not present in Windowed.