Way to programmatically query WHICH dynamic resolution assets are in use ?

I would like to know at run time which set of assets are in use when using newImageRect with dynamic scaling invoked … Is there an API call for this ?

In other words my config.lua has

imageSuffix =
{ ["-15x"] = 1.5 ,
["-2x"] = 2.0,
["-3x"] = 3.0,
},

I would like to know which of the 4 possible ( 1.0 thru 3.0) are in use at run time…

Thanks in advance
Ken
Curved Light Solutions LLC [import]uid: 112538 topic_id: 26277 reply_id: 326277[/import]

bumping - as I would like an answer :slight_smile: [import]uid: 112538 topic_id: 26277 reply_id: 106838[/import]

There is no API to return which resolution is being used but you can use the following code to determine the device’s screen resolution and figure out which graphics are in use.

local actualScreenWidth = math.round((display.contentWidth-2\*display.screenOriginX) / display.contentScaleX) local actualScreenHeight = math.round((display.contentHeight-2\*display.screenOriginY) / display.contentScaleY) [import]uid: 7559 topic_id: 26277 reply_id: 106858[/import]

Tom,

So based on the actual screen dimensions and my ratio settings I should be able to do what I need to do.

thanks for the answer

Ken

[import]uid: 112538 topic_id: 26277 reply_id: 106950[/import]