Skip to content

Use value of UIScreen.MainScreen.Scale to support retina display - #2

Merged
CartBlanche merged 1 commit into
MonoGame:masterfrom
jordoh:retina
Apr 10, 2011
Merged

CartBlanche merged 1 commit into
MonoGame:masterfrom
jordoh:retina

Conversation

@jordoh

@jordoh jordoh commented Apr 10, 2011

Copy link
Copy Markdown
Contributor

This is a pretty minor change that adds the screen point to screen pixel scale factor to support of retina screen resolutions. It updates both the rendering and touch input handling to use the screen's pixel size (MainScreen.Bounds * MainScreen.Scale) instead of the screen's point size (MainScreen.Bounds).

@CartBlanche
CartBlanche merged commit 5808884 into MonoGame:master Apr 10, 2011
@tomspilman tomspilman mentioned this pull request Feb 7, 2013
sulix referenced this pull request in sulix/MonoGame Apr 30, 2013
totallyeviljake pushed a commit that referenced this pull request Jun 8, 2013
Null checks for _mediaElement in handlers.
dellis1972 added a commit that referenced this pull request Sep 29, 2013
KonajuGames pushed a commit that referenced this pull request Jan 30, 2014
AgileJoshua pushed a commit to AgileJoshua/MonoGame that referenced this pull request May 31, 2014
Fix for concurrent modification of the resources list during disposeAll.
nkast referenced this pull request in nkast/MonoGame Sep 25, 2014
There is a bug on WP8 (Lumia 620, Lumia Black) with the Obscure event.
The bug occure sometimes when resume from the Lock screen and cause the
app to pause on a black screen.
It never happens when the phone is attacked to the debugger so this
required some sort of on-screen logging to figure out.

case #1
ApplicationIdleDetectionMode=Enabled (default)
App is suspended either by timeout or power button.

Obscured event triggered. IsLocked=true.
It's safe to ignore the Obscure event since the OS deactivates the app
anyway. IsActive is set to false by OnDeactivate.
When the user unlock the phone Unobscure event triggered but *sometimes*
another Obscured event
arrive after that, causing to app to remain in IsActive=false state.
That's why we need to ignore the event.

case #2
ApplicationIdleDetectionMode=Disabled
App is suspended either by timeout or power button.

Obscured event triggered. IsLocked=true.
We set IsActive=false on Obscure event as before.
When the user unlock the phone Unobscure event triggered and we set
IsActive=true.
Actually a second obscured event is triggered following by an
Unobscured, not an issue here.
In that mode the OS doesn't deactivate the app, allowing the app to run
under lock screen.
note: actually MonoGame doesn't allow run under lock screen
MonoGame#2084.

case #3
ApplicationIdleDetectionMode=Enabled|Disabled
App is suspended by a phone call.

Obscured event triggered. IsLocked=false.
We set IsActive=false on Obscure event.
When the action that obscured the app ends, an Unobscure event is
triggered and we set IsActive=true. No bug here.
That is similar to case #2. The OS doesn't deactivate the app.
Decavoid added a commit to Decavoid/MonoGame that referenced this pull request Oct 28, 2014
KonajuGames added a commit that referenced this pull request Jul 11, 2015
Added Support for ATI compression
@endimilojkoski endimilojkoski mentioned this pull request Jun 17, 2016
@BrianPeek BrianPeek mentioned this pull request Nov 12, 2016
MrPodunkian referenced this pull request in MrPodunkian/MonoGame Dec 2, 2021
- Fixed the CueDefinition/SetSound functions incorrectly assigning th…
AristurtleDev referenced this pull request in AristurtleDev/MonoGame Mar 11, 2024
tomspilman pushed a commit that referenced this pull request Oct 13, 2025
Several fixes for getting WindowsDX working.

This is working off PR #9023

1. Fixed a bug where switching from multiple render targets back to a
single render target wasn't properly handled.
6027892
2. Creating/setting a custom render target was never fully implemented.
Custom render target is now created along with it's depth texture. Fixes
#9021
6027892
4. Disposing of textures was not calling `FreeDescriptors` resulting in
an eventual crash.
6027892
5. `MGG_Buffer_SetData` was not using the correct signature. Going to
need more work.
6027892
6. Fixed bug where a buffer remains on the free list when it doesn't
match the exact size. a04b281

---------

Co-authored-by: sepcnt <[email protected]>
Co-authored-by: Sepcnt <[email protected]>
zignd pushed a commit to zigrok/MonoGame that referenced this pull request Jul 30, 2026
Several fixes for getting WindowsDX working.

This is working off PR MonoGame#9023

1. Fixed a bug where switching from multiple render targets back to a
single render target wasn't properly handled.
MonoGame@6027892
2. Creating/setting a custom render target was never fully implemented.
Custom render target is now created along with it's depth texture. Fixes
MonoGame#9021
MonoGame@6027892
4. Disposing of textures was not calling `FreeDescriptors` resulting in
an eventual crash.
MonoGame@6027892
5. `MGG_Buffer_SetData` was not using the correct signature. Going to
need more work.
MonoGame@6027892
6. Fixed bug where a buffer remains on the free list when it doesn't
match the exact size. a04b281

---------

Co-authored-by: sepcnt <[email protected]>
Co-authored-by: Sepcnt <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants