Skip to content

Conversation

lucab
Copy link
Contributor

@lucab lucab commented Feb 12, 2015

Do not assume ui-container aspect when drawing on other containers.
This fixes LUA draw_text() in multi-screens game, where the font
aspect for each screen is wrongly computed on the aggregated target.

Signed-off-by: Luca Bruno lucab@debian.org

@galibert
Copy link
Member

Could you fold the two instances of container testing into a
get_aspect(container) ui_manager method (or whichever name you want)?

OG.

On Thu, Feb 12, 2015 at 10:53 AM, Luca Bruno notifications@github.com
wrote:

Do not assume ui-container aspect when drawing on other containers.
This fixes LUA draw_text() in multi-screens game, where the font
aspect for each screen is wrongly computed on the aggregated target.

Signed-off-by: Luca Bruno lucab@debian.org

You can view, comment on, or merge this pull request online at:

#129
Commit Summary

  • ui: use per-container pixel aspect (draw_text bugfix)

File Changes

Patch Links:


Reply to this email directly or view it on GitHub
#129.

@lucab lucab changed the title luaengine: fix font aspect-ration in multi-screens games luaengine: fix font aspect-ratio in multi-screens games Feb 12, 2015
@lucab
Copy link
Contributor Author

lucab commented Feb 12, 2015

I had a look at it before sending this, but I have some doubts. I see that ui container has an associated render_target(with orientation, pixel aspect, etc), is there any equivalent for a generic render_container/screen? Otherwise, the folded method will still have to special case for the ui container.

@galibert
Copy link
Member

I have no idea :-) My problem is not with the special casing, it's with
having the same special casing code in two different methods of the same
class.

OG.

On Thu, Feb 12, 2015 at 12:01 PM, Luca Bruno notifications@github.com
wrote:

I had a look at it before sending this, but I have some doubts. I see that
ui container has an associated render_target(with orientation, pixel
aspect, etc), is there any equivalent for a generic
render_container/screen? Otherwise, the folded method will still have to
special case for the ui container.


Reply to this email directly or view it on GitHub
#129 (comment).

@lucab lucab force-pushed the lucab/mame-lua/font-aspect branch from fa32621 to da21407 Compare February 12, 2015 21:30
Do not assume ui-container aspect when drawing on other containers.
This fixes LUA draw_text() in multi-screens games, where the font
aspect for each screen is wrongly computed on the aggregated target.

Signed-off-by: Luca Bruno <lucab@debian.org>
@lucab lucab force-pushed the lucab/mame-lua/font-aspect branch from da21407 to fa18db6 Compare February 12, 2015 21:33
@lucab
Copy link
Contributor Author

lucab commented Feb 12, 2015

I see, then probably you'd prefer this minimally invasive version with a single method and a default parameter...

@lucab
Copy link
Contributor Author

lucab commented Mar 16, 2015

I've folded the two methods back into render_manager::ui_aspect(), but this PR became stale in the meanwhile. As I've piled up some other luaengine fixes and a bit of doc in the meanwhile, let me close this old PR and open a new one with all the fresh stuff.

@lucab lucab closed this Mar 16, 2015
ICEknigh7 added a commit to ICEknigh7/mame that referenced this pull request Jun 8, 2022
- Balalín (type-in, MicroHobby mamedev#125) [Ignacio Prini]
- Magnus Zone (type-in, MicroHobby mamedev#126) [Ignacio Prini]
- Oráculo Egipcio (type-in, MicroHobby mamedev#127) [Ignacio Prini]
- Demolition (type-in, MicroHobby mamedev#128) [Ignacio Prini]
- Basket Trainer (type-in, MicroHobby mamedev#129) [Ignacio Prini]
- Galaxy Fun (type-in, MicroHobby mamedev#130) [Ignacio Prini]
- Micro Draw (type-in, MicroHobby mamedev#131, mamedev#132) [Ignacio Prini]
- El Alambrista (type-in, MicroHobby mamedev#133) [Ignacio Prini]
- Ranamirez (type-in, MicroHobby mamedev#134) [Ignacio Prini]
- Fórmula Suicida (type-in, MicroHobby mamedev#135) [Ignacio Prini]
- Phantasmas (type-in, MicroHobby mamedev#136) [Ignacio Prini]
- Dardos (type-in, MicroHobby mamedev#137) [Ignacio Prini]
- S.E.M.I.S.I.S. (type-in, MicroHobby mamedev#138, mamedev#139) [Ignacio Prini]
- Alley's Gun (type-in, MicroHobby mamedev#140) [Ignacio Prini]
- Kleingeld (type-in, MicroHobby mamedev#141, mamedev#142) [Ignacio Prini]
- Caribe’s Day (type-in, MicroHobby mamedev#143) [Ignacio Prini]
- Rally (type-in, MicroHobby mamedev#144) [Ignacio Prini]
- La Profecía (type-in, MicroHobby mamedev#145) [Ignacio Prini]
- Mine Alert (type-in, MicroHobby mamedev#146, mamedev#147) [Ignacio Prini]
- Freddy (type-in, MicroHobby mamedev#148) [Ignacio Prini]
- Russian's Attack (type-in, MicroHobby mamedev#149, mamedev#150) [Ignacio Prini]
- En Ruta (type-in, MicroHobby mamedev#151) [Ignacio Prini]
- Zinco (type-in, MicroHobby mamedev#152) [Ignacio Prini]
- Ruffo’s Dream (type-in, MicroHobby mamedev#153) [Ignacio Prini]
- Crozet (type-in, MicroHobby mamedev#154) [Ignacio Prini]
- Rock Animation (type-in, MicroHobby mamedev#155) [Ignacio Prini]
- Bunker (type-in, MicroHobby mamedev#156) [Ignacio Prini]
- Telepuzzle (type-in, MicroHobby mamedev#157) [Ignacio Prini]
- Golfo Pérsico (type-in, MicroHobby mamedev#158) [Ignacio Prini]
- Mad Drivers (type-in, MicroHobby mamedev#159) [Ignacio Prini]
- Bowling Star (type-in, MicroHobby mamedev#160) [Ignacio Prini]
- Gas-Car (type-in, MicroHobby mamedev#161) [Ignacio Prini]
- Ghost Like (type-in, MicroHobby mamedev#162) [Ignacio Prini]
- Sky Invaders (type-in, MicroHobby mamedev#163) [Ignacio Prini]
- Perico Jones (type-in, MicroHobby mamedev#164) [Ignacio Prini]
- Brad Zotes (type-in, MicroHobby mamedev#165) [Ignacio Prini]
- Striker (type-in, MicroHobby mamedev#166) [Ignacio Prini]
- Indy (type-in, MicroHobby mamedev#167) [Ignacio Prini]
- Topin (type-in, MicroHobby mamedev#168) [Ignacio Prini]
- Starlike (type-in, MicroHobby mamedev#169) [Ignacio Prini]
- Tres en Raya (type-in, MicroHobby mamedev#170) [Ignacio Prini]
- Goteras (type-in, MicroHobby mamedev#171) [Ignacio Prini]
- Parvision (type-in, MicroHobby mamedev#172) [Ignacio Prini]
- Furax (type-in, MicroHobby mamedev#173) [Ignacio Prini]
- Duck Shooting (type-in, MicroHobby mamedev#174) [Ignacio Prini]
- Nomen Rosae (type-in, MicroHobby mamedev#175) [Ignacio Prini]
- PunkyMan (type-in, MicroHobby mamedev#176) [Ignacio Prini]
- El Retorno del Yedi (type-in, MicroHobby mamedev#177) [Ignacio Prini]
- Sky Warrior (type-in, MicroHobby mamedev#178) [Ignacio Prini]
- Reptkon (type-in, MicroHobby mamedev#179) [Ignacio Prini]
- Intro (type-in, MicroHobby mamedev#180) [Ignacio Prini]
- Keops (type-in, MicroHobby mamedev#181) [Ignacio Prini]
- Sir Gawain (type-in, MicroHobby mamedev#182) [Ignacio Prini]
- Snake (type-in, MicroHobby mamedev#183) [Ignacio Prini]
- Microbowl (type-in, MicroHobby mamedev#184) [Ignacio Prini]
- God Save the Punk (type-in, MicroHobby mamedev#185) [Ignacio Prini]
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