Author Topic: Borderless mode? [SOLVED]  (Read 5047 times)

prozajik

  • Autococker
  • Posts: 761
Borderless mode? [SOLVED]
« on: January 20, 2014, 08:15:24 AM »
Is there any way to get paintball to run in windowed borderless mode?
I have seen some utilities on internet, which were able to "force" borderless, but i wasnt able to get any of them working with PB correctly. The utility wasnt able to remove windows bars from paintball window.
So, anyone here who got it working/knows how to get around it?

EDIT:
NVM, found tool which could do it
http://runtimelegend.com/rep/fullscreenizer/index
...
Run game in native resolution in windowed mode
Click "fullscreenize"
Done
« Last Edit: January 20, 2014, 09:47:07 AM by prozajik »

jitspoe

  • Administrator
  • Autococker
  • Posts: 18802
Re: Borderless mode? [SOLVED]
« Reply #1 on: January 20, 2014, 10:46:11 AM »
Just out of curiosity, what's the advantage of this over running in fullscreen mode?

JMR

  • Map Committee
  • Autococker
  • Posts: 574
Re: Borderless mode? [SOLVED]
« Reply #2 on: January 20, 2014, 10:50:50 AM »
Just out of curiosity, what's the advantage of this over running in fullscreen mode?

I run paintball2 on my iMac (it's 27inch) it's hard to see all of the screen at once, so sometimes I run it in windowed mode. However, the window border gets distracting/annoying.

SuperMAn

  • Committee Member
  • Autococker
  • Posts: 902
Re: Borderless mode? [SOLVED]
« Reply #3 on: January 20, 2014, 10:58:43 AM »
Just out of curiosity, what's the advantage of this over running in fullscreen mode?

Borderless window is usually preferred for streaming.  He can just select the application instead of selecting area of the screen.  Fullscreen is a big no no for streamers.
« Last Edit: January 20, 2014, 11:35:00 AM by SuperMAn »

prozajik

  • Autococker
  • Posts: 761
Re: Borderless mode? [SOLVED]
« Reply #4 on: January 20, 2014, 11:52:29 AM »
Just out of curiosity, what's the advantage of this over running in fullscreen mode?
Borderless window is usually preferred for streaming.  He can just select the application instead of selecting area of the screen.  Fullscreen is a big no no for streamers.
Yep, what superman said is correct. I am actually using dxtory for recording PB, which has decent support for fullscreen applications. But paintball stops recording everytime it loses focus (alt+tab).
Also, windowed borderless mode makes stream continue, even if you alt+tab away to change song, so it doesnt go black.

Rockyar_96

  • 68 Carbine
  • Posts: 370
Re: Borderless mode? [SOLVED]
« Reply #5 on: February 20, 2014, 03:54:23 PM »
my solution to this:
1)open Dpb2
2)open source-engine based game
3)tab out of source game
4)close source game

its not really windowed mode, its somehow bugged :)

prozajik

  • Autococker
  • Posts: 761
Re: Borderless mode? [SOLVED]
« Reply #6 on: February 21, 2014, 08:04:31 AM »
Seems a little complicated honestly ^^, or should i say "forced", even tho there is solution which works, the one i described.
Also i found much easier solution using autohotkey script.
If anyone is interested i will upload it here, its basically paintball run bat, which starts autohotkey with script and then closes autohotkey. This script does exactly what "fullscreenizer" does, but its all with simple click ;)

Source:http://www.autohotkey.com/

not_payl_obviously

  • 68 Carbine
  • Posts: 415
Re: Borderless mode? [SOLVED]
« Reply #7 on: February 21, 2014, 10:43:26 AM »
I know most of you can't modify source, because workarounds are best, but here are instructions how to modify source to get borderless window under win32:
1.Download source
2.Get Visual Studio or something that can compile DP (GCC?)
3.Go to file win32/glw_imp.c
4.Find procedure VID_CreateWindow (for me line 77)
5.Find line "stylebits = WS_OVERLAPPEDWINDOW;" in else section of "fullscreen" IF.
6.Modify it to "stylebits=0;" or anything other you desire: http://msdn.microsoft.com/en-us/library/windows/desktop/ms632600%28v=vs.85%29.aspx
7.Compile
8.???
9.PROFIT!

EDIT: For people that are too lazy to recompile source, here are instructions for b40 (and ONLY for it): Grab any hex editor, open up ref_pbgl.dll, go to byte $1A9A4, which should  be set to $CF, replace it with $00. Save and enjoy (no, you wont get banned for that, unless you run PAC which is capable of detecting that).


Outdated, please look on later replies.
« Last Edit: February 24, 2014, 11:26:11 AM by not_payl_obviously »

prozajik

  • Autococker
  • Posts: 761
Re: Borderless mode? [SOLVED]
« Reply #8 on: February 24, 2014, 09:55:49 AM »
\
EDIT: For people that are too lazy to recompile source, here are instructions for b40 (and ONLY for it): Grab any hex editor, open up ref_pbgl.dll, go to byte $1A9A4, which should  be set to $CF, replace it with $00. Save and enjoy (no, you wont get banned for that, unless you run PAC which is capable of detecting that).
Well, tried this one and its not exactly borderless. Yes, the border is the smallest you can get, but it still has a border. Went through microsoft link you sent and none of the options looked like real borderless.

PS:Wanted to experiment with options from the link, unfortunately i wasnt able to get the source to compile :/

not_payl_obviously

  • 68 Carbine
  • Posts: 415
Re: Borderless mode? [SOLVED]
« Reply #9 on: February 24, 2014, 11:24:48 AM »
Well, I checked in my IDE what it does to make it borderless, the mixture turns out to be:
WS_CLIPCHILDREN or WS_CLIPSIBLINGS or WS_POPUP or WS_SYSMENU or WS_VISIBLE
in hex it's $960B0000.
One may wonder how to put it into his already compiled ref_pbgl.dll: Answer is DWORD at $1A9A2 (which is basically two bytes before our $CF), but this time we write DWORD, not a single byte. Place you write is going to be 4 bytes long, and is now $00CF0000 (notice how I reverse all bytes in order, this is because of x86 architecture being little-endian (see http://en.wikipedia.org/wiki/Endianness )).
So in order to modify this we need to modify those four bytes to summarize: $00=>$00, $00=>$00, $CF=>$0B, $00=>$96.
Please again notice that this is ONLY for b40.

Here are some more generic instructions how to be a hacker and find yourself where to modify this (warning: this might have some differences than showed, basically if jitspoe decides to modify his code around place we are working on, but hopefully should work around b40, maybe even b50 if we even reach that):
1.Download Free IDA Pro (free version is enough).
2.Open your ref_pbgl.dll in it (press OK after it asks you how to decode), and wait until it ends processing file (ding should happen when thats done).
3.You should have string view as showed on screenshot (number 1). Start entering letters that are in 2 "Couldn't register blablabla", until you find this same string in your string view. Double-click.
4.Now you will see place where this string is. This string doesn't interest us, but is near to place that is important for us, so we move cursor to "aCouldnTRegiste" (this is name my IDA gave to this string, it should be right after "db '<string here>'"). We press key X.
5.Xrefs window will pop, since we have only one reference to this place, we press OK.
6.Now you should see code similar to one that I show. If it's not, try pressing Space to enter other view mode.
7.Move to code that I marked with 3, this is place that we modify. Notify that IDA guessed what this variable is, telling us "dwStyle". Also we notify DWORD we want: "0CF0000h". But where it is in our file?
8.Move your cursor exactly to line I showed, then press Space to enter normal view. Now again make sure that cursor is exactly in that line I showed (IDA likes to change it sometimes).
9.Change your tab to HexView (marked 4). Now you will see hex notation of file: If you done everything right, IDA should highlight instruction we are on now. You can see bytes: $00,$00,$CF,$00 at end of this instruction. Move your cursor to first of that four bytes.
10.Now don't make mistake, the number shown on left is only valid after file is loaded to memory. We need a offset in file. This should be on lower information panel (marked with 5, but on other view, so you can't see it there). There are few offsets there, left-most is the one we need.
11. Grab any hex editor and do your changes. Be aware that IDA will not show you changes: You need to exit IDA and reload file to do that (with clear database, so no need to save it).
12. Verify that you did correct modification: Only our hex value should be changed, all other instructions should look same as first time you looked at them. If something went wrong: Revert from backup that you of course made. If everything is okay, run file and you should get a borderless mode!
Have fun hacking, who knows what those files have hidden inside.

prozajik

  • Autococker
  • Posts: 761
Re: Borderless mode? [SOLVED]
« Reply #10 on: February 25, 2014, 01:56:55 AM »
Heh worked pretty well, thanks. Altho, i feel like that IDA steps were pretty unnecessary as all i did was edit the four bytes, because i already knew where they are from what you wrote before. But they were still pretty cool :p

Rockyar_96

  • 68 Carbine
  • Posts: 370
Re: Borderless mode? [SOLVED]
« Reply #11 on: February 25, 2014, 12:26:49 PM »
can you link your stream? :)
would like to watch play someone paintball ^^

prozajik

  • Autococker
  • Posts: 761
Re: Borderless mode? [SOLVED]
« Reply #12 on: February 25, 2014, 02:41:04 PM »
can you link your stream? :)
would like to watch play someone paintball ^^
http://www.twitch.tv/prozajikgaming
I dont stream on any schedule tho. Also my internet still kinda sucks but i am hoping to resolve it in a month period. ATM its kinda annoying to stream and get occasional lag spikes, but its not that often. I usually stream in the evening, around 21:00-23:00 CET (GMT +1).
I might try adding some commentary as well to make it interesting, i realised i could commentate most of my actions as i usually have some plan when i rush/hold back (usually because i fail some jump). Well, i will see, hopefully with my new headset (arriving tomorrow).

EDIT:Payl, you'r the boss, works for streaming like a charm ^^, tx

not_payl_obviously

  • 68 Carbine
  • Posts: 415
Re: Borderless mode? [SOLVED]
« Reply #13 on: February 25, 2014, 05:09:54 PM »
Altho, i feel like that IDA steps were pretty unnecessary as all i did was edit the four bytes, because i already knew where they are from what you wrote before.
This other section was designed to be future-proof as this offset wont work in b41 etc.

EDIT:Payl, you'r the boss, works for streaming like a charm ^^, tx
No problem.

jitspoe

  • Administrator
  • Autococker
  • Posts: 18802
Re: Borderless mode? [SOLVED]
« Reply #14 on: February 26, 2014, 09:55:13 PM »
Well, I checked in my IDE what it does to make it borderless, the mixture turns out to be:
WS_CLIPCHILDREN or WS_CLIPSIBLINGS or WS_POPUP or WS_SYSMENU or WS_VISIBLE
Thanks.  I've added a vid_borderless cvar to enable that for the next build.