Page 1 of 2
Wrong DesktopWidth ()/DesktopHeight () returns
Posted: Fri Oct 17, 2014 12:27 pm
by es_91
Re: [Bug] Wrong DesktopWidth/DesktopHeight() returns in VMwa
Posted: Fri Oct 17, 2014 1:03 pm
by Fred
We use regular API command, so it's probably a VMWare issue. We don't support report in virtual machines, as it's just emulation and it can have its own flaws.
Re: [Bug] Wrong DesktopWidth/DesktopHeight() returns in VMwa
Posted: Fri Oct 17, 2014 1:09 pm
by es_91
Okay, thanks. Sad.

Re: [Bug] Wrong DesktopWidth/DesktopHeight() returns in VMwa
Posted: Sat Oct 18, 2014 4:06 am
by RASHAD
Switch VMware display mode to Full Screen and you will get the right answer
Re: [Bug] Wrong DesktopWidth/DesktopHeight() returns in VMwa
Posted: Sat Oct 18, 2014 9:10 am
by blueznl
Try a different VM (VirtualBox or whatever) to verify that it is VMware and not your own code. If it is not your own code report the bug to the manufacturer of VMware.
I just verified and I have NO issue on VirtualBox.
Re: [Bug] Wrong DesktopWidth/DesktopHeight() returns in VMwa
Posted: Sat Oct 18, 2014 1:57 pm
by Alex777
As I said in the other thread, I have checked and have no such issue with VMware Player.
Re: [Bug] Wrong DesktopWidth/DesktopHeight() returns in VMwa
Posted: Tue Oct 21, 2014 12:09 pm
by es_91
I can not double check the error in my personal pc at home, but i found another anomaly:
When a program is executed in compatibility mode with a resolution of 640x480, the screen is practically set to 640x480, but DesktopWidth() and DesktopHeight() return both the value of the before-set screen resolution (e.g. 800x600).
Should that be wrong?
Re: [Bug] Wrong DesktopWidth/DesktopHeight() returns in VMwa
Posted: Tue Oct 21, 2014 1:30 pm
by PB
> When a program is executed in compatibility mode [...]
Do you mean in VMware, or on a real PC?
Re: [Bug] Wrong DesktopWidth/DesktopHeight() returns in VMwa
Posted: Tue Oct 21, 2014 1:47 pm
by es_91
I mean, on a real PC.
I can also use the Windows' ability to select smaller resolutions than 800x600 ONCE the compatibility mode-program has started (before the smaller resolutions should not be visible in your Display Settings) and it ALSO is not recognized in PureBasic's DesktopWidth() and DesktopHeight() functions (those still Show 800x600 or higher).
... Fred?

Re: [Bug] Wrong DesktopWidth/DesktopHeight() returns in VMwa
Posted: Tue Oct 21, 2014 3:41 pm
by Fred
As previously said, we use standard Windows function for this: EnumDisplaySettings_(). Feel free to toy with it and if you find something odd, please post it

.
Re: [Bug] Wrong DesktopWidth/DesktopHeight() returns in VMwa
Posted: Wed Oct 22, 2014 6:31 am
by es_91
Hi, Fred. Nice, that you take care of this.
I toyed around with the
EnumDisplaySettings_ () function, as you said, and i found that the values returned by it are correct, even when the compatibility mode with less than 800x600 Pixels is on.
Please see the following screen:
Notice that the image's resolution is 640x480, so the first two values are correct, PureBasic's functions return wrong.
Re: [Bug] Wrong DesktopWidth/DesktopHeight() returns in VMwa
Posted: Wed Oct 22, 2014 10:50 am
by es_91
Oh, I am facing a different kind of problem here. It seems on the network PC I am on the DesktopWidth() and DesktopHeight() values are always 800x600, no matter what resolution i set up in the Display Settings.
Again, we're not working with VMware anymore, here!
What the heck is this?
Re: [Bug] Wrong DesktopWidth/DesktopHeight() returns in VMwa
Posted: Wed Oct 22, 2014 12:32 pm
by Fred
Did you use ExamineDesktop() before DesktopWidth/Height() ?
Re: [Bug] Wrong DesktopWidth/DesktopHeight() returns in VMwa
Posted: Wed Oct 22, 2014 2:32 pm
by es_91
Sure.
Re: [Bug] Wrong DesktopWidth/DesktopHeight() returns in VMwa
Posted: Wed Oct 22, 2014 2:45 pm
by es_91
I found the mistake.
My PC has two desktops:
PB Debugger wrote:2
The #Null desktop was not the visible one. I do not know why my PC has two desktops, it must have something to do with the fact that it's a controlled network PC, propably a MasterEye problem or whatever. Because strangely the Display Settings show only one display/desktop (see below).
PB Debugger wrote:\\.\DISPLAYV4
System Setting's desktop drop-down menu wrote:PLE481