Get Display resolution

Linux specific forum
gavindi
User
User
Posts: 41
Joined: Mon Jan 21, 2013 12:57 am

Get Display resolution

Post by gavindi »

Hi,

Does anyone know how to get the current display resolution under Linux? I'm guessing it's going to involve importing C and doing X11 API junk since ExamineDesktop() doesn't work.
Any help would be hugely appreciated.

Cheers,
G.
Using Ubuntu 14.04 x64, Intel4700HD Graphics, 16GB RAM
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Re: Get Display resolution

Post by ts-soft »

gavindi wrote:since ExamineDesktop() doesn't work.
Works fine here!
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
gavindi
User
User
Posts: 41
Joined: Mon Jan 21, 2013 12:57 am

Re: Get Display resolution

Post by gavindi »

It was unsupported in PB5.0, so is it in 5.1 that it works? Or do I have it wrong? The documentation says it's only for Windows & OSX.
Using Ubuntu 14.04 x64, Intel4700HD Graphics, 16GB RAM
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Re: Get Display resolution

Post by ts-soft »

gavindi wrote:The documentation says it's only for Windows & OSX.
All helpfiles on my PC, from PB3.94 to 5.10 say: supported OS All
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
gavindi
User
User
Posts: 41
Joined: Mon Jan 21, 2013 12:57 am

Re: Get Display resolution

Post by gavindi »

Yep, my bad. It only the DesktopFrequency() that doesn't support Linux. I think I've been staring at my monitor for too long. I'm going outside for fresh air. :)
Using Ubuntu 14.04 x64, Intel4700HD Graphics, 16GB RAM
Post Reply