there some confusing situations with purebasic using DPI, some solutions work, but should not... some should work but dont.
I am confused about all this working/not working,
this example works with PureBasic Beta 6 V5 CBackend,
if you try it with Beta 6 it will fail....
this routine works for fullscreen (windowed screen) using PureBasic Beta 6 V5 CBackend:
Code : Tout sélectionner
Procedure E_Open_Display_WIN_MAX(display_x,display_y,display_w,display_h,display_name.s)
;fullscreen (windowed screen)
Define ok.b=0
If e_fullscreen.b=#False
ProcedureReturn #False ;we did not set to fullscreen
EndIf
Select e_vsync
Case #True
v_display_id=OpenWindow(#ENGINE_WINDOW_ID,display_x,display_y,e_engine_internal_screen_w,e_engine_internal_screen_h,"Thorins Quest"+e_copy_right_text.s,#PB_Window_BorderLess)
v_display_id=WindowID(#ENGINE_WINDOW_ID)
v_screen_id=OpenWindowedScreen(v_display_id,display_x,display_y,e_engine_internal_screen_w,e_engine_internal_screen_h,#True,0,0,#PB_Screen_WaitSynchronization)
Default
v_display_id=OpenWindow(#ENGINE_WINDOW_ID,display_x,display_y,e_engine_internal_screen_w,e_engine_internal_screen_h,"Thorins Quest"+e_copy_right_text.s,#PB_Window_BorderLess)
v_display_id=WindowID(#ENGINE_WINDOW_ID)
v_screen_id=OpenWindowedScreen(v_display_id,display_x,display_y,e_engine_internal_screen_w,e_engine_internal_screen_h,#True,0,0,#PB_Screen_NoSynchronization)
;do not show mouse pointer if game is runing in full window
EndSelect
e_npc_text_field_x.f=0
e_npc_text_field_y.f=ScreenHeight()-ScreenHeight()/6
e_npc_text_field_w.f=ScreenWidth()
e_npc_text_field_h.f=ScreenHeight()/6
StickyWindow(#ENGINE_WINDOW_ID,#False)
ShowCursor_(#False)
ResizeWindow(#ENGINE_WINDOW_ID,0,0,DesktopWidth(0)/DesktopResolutionX(),DesktopHeight(0)/DesktopResolutionY())
EndProcedure