It is currently Fri Jul 03, 2020 10:55 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Mouse functions broken on 3D Windows on 4K Display
PostPosted: Thu Jul 25, 2019 12:58 am 
Offline
New User
New User

Joined: Thu Jul 25, 2019 12:51 am
Posts: 1
Hello PB Team,

there is a issue with the MouseDeltaX, MouseDeltaY Functions on 4k Screens when Screen3D is used windowed.

No matter if the mouse is moved up or down ( or left or right) only positive values are returned by the MouseDelta Functions.

When i start the Programm Fullscreen instead of Windowed positive and negative values are returned.
When i change the display resolution of my laptop to 1920*1080 and then start the PB Programm Windowed positive and negative values are returned.
When i change back the display resolution of the laptop to 4K only positive values are returned.

Best regards,

Andreas


Top
 Profile  
Reply with quote  
 Post subject: Re: Mouse functions broken on 3D Windows on 4K Display
PostPosted: Thu Jan 02, 2020 12:14 pm 
Offline
Enthusiast
Enthusiast

Joined: Mon Nov 25, 2013 5:38 am
Posts: 254
Location: Australia
I had this problem intermittently (it would come and go) with my 4K monitor only while using openGL as the subsystem. I don't have the problem when using DirectX. I had another problem with openGL too, the frame rate sat at about 20 instead of 60.
EDIT: I do occassionally get the problem intermittently but I don't think it related to OpenGL, I had some wrong code earlier. The problem does happen occasionally and I have to restart PB to fix it.


Last edited by coco2 on Wed Jan 22, 2020 12:23 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: Mouse functions broken on 3D Windows on 4K Display
PostPosted: Wed Jan 15, 2020 12:56 am 
Offline
Addict
Addict
User avatar

Joined: Sat Feb 19, 2011 10:06 am
Posts: 853
Location: Denmark
Confirmed...But it is not only related to 4k resolution.
The problem arises when you add the latest windows updates from Microsoft.
For some reason MouseDelta goes haywire. The erratic behaviour
of (at times) large positive values only, is present in All windows versions, which
is able to download and apply the latest updates.
Before these updates, MouseDelta behaves as it should.
Tested and observed on Windows 8.1, Windows 10 home and Pro with latest updates applied.

Edit: Examples to try..Switch between FullScreen/Windowed

Edit 2: Just tried with PureBasic 5.62 on the same windows versions as above - same results.
Compiled versions (2D/3D examples) has been tested on 14 windows installed computer.
Only 5, which was without updates reported normal values from MouseDelta.

Examples to try:
CameraFollow.pb
MousePick.pb
Entity.pb
e.t.c...
2d code:
Code:
InitSprite()
InitKeyboard()
InitMouse()

ExamineDesktops()
Global w = DesktopWidth(0)
Global h = DesktopHeight(0)
Global s.i

Procedure.i InitFullScreen()
  OpenScreen(w, h, 32, "FS")
  s = CreateSprite(#PB_Any, 50, 50)
  StartDrawing(SpriteOutput(s))
  Box(0, 0, OutputWidth(), OutputHeight(), $36EE3F)
  StopDrawing()
  Repeat
    ClearScreen(0)
    ExamineMouse()
    DisplaySprite(s, MouseDeltaX() + (ScreenWidth()/2 - 25), MouseDeltaY() + (ScreenHeight()/2 -25))
    FlipBuffers()
    ExamineKeyboard()
   
  Until KeyboardReleased(#PB_Key_Escape)
EndProcedure

Procedure.i InitWindowed()
  OpenWindow(0, 0, 0, w, h, "Windowed", #PB_Window_ScreenCentered)
  OpenWindowedScreen(WindowID(0), 0, 0, w, h)
  s = CreateSprite(#PB_Any, 50, 50)
  StartDrawing(SpriteOutput(s))
  Box(0, 0, OutputWidth(), OutputHeight(), $36EE3F)
  StopDrawing()
  Repeat
    ClearScreen(0)
    Repeat
      ev = WindowEvent()
    Until ev = 0
    ExamineMouse()
    DisplaySprite(s, MouseDeltaX() + (ScreenWidth()/2 - 25), MouseDeltaY() + (ScreenHeight()/2 -25))
    FlipBuffers()
    ExamineKeyboard()
  Until KeyboardReleased(#PB_Key_Escape)   
EndProcedure
;InitFullScreen()
InitWindowed()

_________________
“Tell me and I forget. Teach me and I remember. Involve me and I learn.”
— Benjamin Franklin
Current configurations: Windows 10, Intel 6800K, GeForce Gtx 1060, 32 gb ram.


Top
 Profile  
Reply with quote  
 Post subject: Re: Mouse functions broken on 3D Windows on 4K Display
PostPosted: Tue Jan 21, 2020 2:26 pm 
Offline
Addict
Addict
User avatar

Joined: Sat Feb 19, 2011 10:06 am
Posts: 853
Location: Denmark
@Fred
I really don't think, that you can do anything about this.
The problem is not persistent. Sometime it works and sometime it don't. :?
If you suddently got the erratic behaviour and compile it,
the problem continues in the compiled software..
Right now, I get correct values from CameraFollow.pb
and Entity.pb behaves erratic..
Yesterday, none of the two examples worked properly.
Now compiling/running the CameraFollow.pb results in correct behaviour
while Entity.pb is wrong.. I guess that this will probably
suddently change... :lol:
Best regards

I now know that it is IDE related (Combined with Windows updates).
Here's an animated gif displaying the issue:

Image

_________________
“Tell me and I forget. Teach me and I remember. Involve me and I learn.”
— Benjamin Franklin
Current configurations: Windows 10, Intel 6800K, GeForce Gtx 1060, 32 gb ram.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye