Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - walknight

Pages: [1]
1
General / How to check the width/height of artwork
« on: August 07, 2020, 05:08:45 PM »
The theme I'm using has this code
Code: [Select]
local bgart = fe.add_artwork( "flyer", flw*0.2, 0, flw*0.6, 0);
bgart.preserve_aspect_ratio = true;
That is, it scales the image width to 60% of screen width and scales the height accordingly to keep the original aspect ratio.
But when I have an artwork in landscape direction, the scaled height is too short to fill the screen (see attached pic).

So I want to check the actual dimension of the image and scale it differently, either by width or by height.
I tried this code
Code: [Select]
    local bgart = fe.add_artwork( "flyer", flw*0.2, 0, flw*0.6, 0);
    bgart.preserve_aspect_ratio = true;

    if ( bgart.height < flh )
    {
      bgart.height = flh;
      bgart.width = 0;
    }
But it didn't work: "bgart.height" actually returns 0 instead of the actual scaled height, so the test is always true and it always scales to the height.

So is there a way to check the dimension of an artwork?

2
General / Screen resolution
« on: August 02, 2020, 10:19:49 AM »
Using the nevato layout I see the printout of "res_x" and "res_y" are 2133 x 1200. While my monitor has a max resolution of 1920x1080. Is that normal?
And I prefer to use 1280x720 for better performance. Is there a way to specify the resolution to run AM in?
Thanks!

3
General / Import romlist but only keep entries I have roms available
« on: August 01, 2020, 11:25:23 AM »
For some reason I cannot let AM auto create a romlist (using libretro cores for example).
So I tried to import a hyperlist format romlist.
That went successfully but I found the created romlist has all entries from the original hyperlist xml, not limited to the roms I actually have.
How do I limit the romlist to the roms I have?
Or more preferably, is there a way to keep a "complete" romlist, but when AM starts let it scan the rom directory and only display entries I actually have? That was the behavior of the front-end I used previously. That way I can add/remove roms without having to recreate the romlist.

4
General / Multilevel menu
« on: July 31, 2020, 01:15:24 PM »
Hello everyone. I just started using AM coming from another front-end.
I want to set up things the same way I had before, like:

Code: [Select]
Arcade
   Genres
   Systems
   Collections
   ...
Consoles
   Sega
       Genesis
       SMS
   Nintendo
       GBA
       GBC
   ...
Handhelds
   SNK
   Nintendo
   ...

That is I want to navigate these different levels of system using joysticks and buttons, without having to bring up the configure menu.
What is the AM way of doing this? Sorry if it's a dumb question. The tutorial I found only talked about setting up MAME.

5
General / Help me get started
« on: July 25, 2020, 08:56:47 PM »
I managed to build attract mode on a RK3328 linux box.
I copied everything inside the "config" folder in the source archive to /tmp/config/ , then ran

./attract -c /tmp/config

And I got this message and the program exits:

Code: [Select]
Warning: Attract-Mode was compiled to look for its default configuration files in: /usr/local/share/attract/, which is not available.
Config file not found: /tmp/config/attract.cfg
 - Constructed 1 filters in 0 ms (1 comparisons)
Error, could not find default font.

Can someone send me a default attract.cfg to get me started?

Pages: [1]