OK, so I KINDA got it to work, but it's got issues... when you press escape it DOES go to windowed mode, BUT that's the extent of what it does... The problem is that it doesn't change the window properties so so that it is moveable, resizable, minimizable, etc. It's just a box with the rendering inside of it. It's also STUCK on top of everything else. I tried to use the known commands to get it to become a normal window, but when I do that it gets pushed right back into full screen. It's like something isn't getting reset properly.
At any rate, it's a little better than it was before, you can at least press escape and not exit and it does go to the windowed resolution of the choice you select in the DX plugin options screen.
I still have to figure out how to do it properly.
If any devs are reading this....
Instead of using SetWindowPos and SetWindowLong, I'm using MoveWindow, because when using the former, it doesn't work. I make the call to TeardownObjects() in Renderer class and then do a Modified D3D::Reset() call that I modified to set the windowed/fullscreen attribute in the d3d present properties as needed. I realize that you can't set the window attributes because of this. But doing the SetWindowPos and SetWindowLong aren't working, they just put it right back into Fullscreen, for reasons beyond me... Is there something else that has to be changed/reset before the call to the D3D Reset happens? Maybe some matricies that aren't getting reset or something? It's like there is still a buffer that's active or something when it gets reset... I dunno the flow of the render code, so I gotta look into this more I guess...
At anyrate, I've uploaded this into my latest build... for those that would like to test it.
At any rate, it's a little better than it was before, you can at least press escape and not exit and it does go to the windowed resolution of the choice you select in the DX plugin options screen.
I still have to figure out how to do it properly.
If any devs are reading this....
Instead of using SetWindowPos and SetWindowLong, I'm using MoveWindow, because when using the former, it doesn't work. I make the call to TeardownObjects() in Renderer class and then do a Modified D3D::Reset() call that I modified to set the windowed/fullscreen attribute in the d3d present properties as needed. I realize that you can't set the window attributes because of this. But doing the SetWindowPos and SetWindowLong aren't working, they just put it right back into Fullscreen, for reasons beyond me... Is there something else that has to be changed/reset before the call to the D3D Reset happens? Maybe some matricies that aren't getting reset or something? It's like there is still a buffer that's active or something when it gets reset... I dunno the flow of the render code, so I gotta look into this more I guess...
At anyrate, I've uploaded this into my latest build... for those that would like to test it.