MAMEUIFX
http://mame32fx.altervista.org/forum/

More mods of interest...
http://mame32fx.altervista.org/forum/viewtopic.php?f=1&t=180
Page 1 of 3

Author:  Robert [ 18/04/2015, 23:40 ]
Post subject:  More mods of interest...

I'll put in this thread the modifications I've done which might be of interest to MAMEUIFX. You can pick & choose whatever you want.

Most of the mods will be in the HBMAME git first, because it's a lot faster to do a compile.

Fixes for screenshot.c : removed astring. Fixed a bunch of bugs. Supported image locations are now:
/game.png
/game0000.png
/game.zip (/game.png inside)
/game/game.zip (/game.png inside)
/game/game.png
/game/0000.png
/zipname.zip (e.g. snap.zip for snaps, cabinet.zip for cabinets, etc)
About half of this was broken previously.

A change for the background image: You are no longer restricted to 'bkground.png', you can use any filename you wish, anywhere you wish. Its position in the ini file has the full name instead of the directory. And so, you cannot change it via the menu directory setting, only via choosing another background. And lastly, you can only use PNG files, the option of BMP has been removed (it wasn't working anyway).

I'll add more as they happen.

Author:  mamesick [ 19/04/2015, 10:31 ]
Post subject:  Re: More mods of interest...

Actually, there's no more support for background images in MAMEUIFX. It was removed at least 2 or 3 years ago and it won't be back. As you noticed, it never worked as expected and if re-implemented now, it would break the alpha-blending row selection for the List View which I use in FX.

I'll have a look at the screenshots fixes in the future.

Thanks.

Author:  Robert [ 28/06/2015, 12:27 ]
Post subject:  Re: More mods of interest...

Clean up of old unused game info databases etc

https://github.com/Robbbert/mameui/comm ... d9f7ca4fe4

Doesn't seem to have any adverse effect, but you should check first, of course.

Author:  mamesick [ 28/06/2015, 14:59 ]
Post subject:  Re: More mods of interest...

I agree, because drivers list is already sorted by the core during compiling process, when DRIVLIST.C is created. So we should safe.

Author:  mamesick [ 29/06/2015, 20:13 ]
Post subject:  Re: More mods of interest...

The commit by Dankan1980 for MAMEUI is fine and speedup things at startup a bit. Thanks for make me aware of it.

Author:  Robert [ 05/07/2015, 15:22 ]
Post subject:  Re: More mods of interest...

In MESSUI I've added a modification to allow multiple directories to be used for the pictures (snaps, pcbs, control panels, marquees, titles, cabinets). This has now just been ported to MAMEUI. Some parts for MESSUI accidently came over so you probably want to remove those bits.

Another thing done in MESSUI is fixing various problems with saving settings to mess.ini and so on. I was able to get rid of DIRECTORIES.INI from this. This stuff is also going to be ported to MAMEUI late next week.

If you're interested.

Author:  mamesick [ 05/07/2015, 16:27 ]
Post subject:  Re: More mods of interest...

Robert wrote:
Another thing done in MESSUI is fixing various problems with saving settings to mess.ini and so on. I was able to get rid of DIRECTORIES.INI from this. This stuff is also going to be ported to MAMEUI late next week.

If you're interested.


It should be obvious I'm interested. The DIRECTORIES.INI is a gross hack I implemented in MAMEUI when there was a serious breakage with the options core. If you fixed the problem in a right way, it will be in my build as well. I look forward for your code.

On a side note, if you're in the mood to do it, a recent commit by Vas Crabb eliminated every difference between FREE(variable) and OSD_FREE(variable) in the core. So I replaced in my UI code all instances of OSD_FREE with standard C function FREE and all is working as usual. No memory leaks detected. The same can be done for OSD_MALLOC that can be replaced with MALLOC and in datamap.c file this portion of code is no more needed after the changes above:
Code:
#undef malloc
#undef realloc
#undef free

you can simply use this:
Code:
// FIXME: realloc is dangerous!
#undef realloc

I also get rid of in my code of a lot of std::string usage in favour of standard C functions sprintf/snprintf where it possible.
Less dependencies from the core, easier to be mantained in the future.

Author:  Robert [ 06/07/2015, 0:15 ]
Post subject:  Re: More mods of interest...

std::string is a standard part of c++, nothing to do with core usage. I'm looking forward to using std::string more, not less.

The other matters I'll look at when I get back on Wednesday.

Author:  mamesick [ 06/07/2015, 6:32 ]
Post subject:  Re: More mods of interest...

Robert wrote:
std::string is a standard part of c++, nothing to do with core usage. I'm looking forward to using std::string more, not less.


Yes, I know this. What I was meaning is that if there will be a relevant change regarding its usage in the core, I'll be already ok. Standard C snprintf is fine too and safe againts buffers overflow.

Author:  Robert [ 09/07/2015, 15:53 ]
Post subject:  Re: More mods of interest...

HBMAMEUI has been updated with the code to get rid of DIRECTORIES.ini

The setup of INI files is now critical, in order to avoid "bugs-that-aren't-bugs" appearing.

Read: http://www.1emulation.com/forums/topic/ ... ini-files/

Do some very careful testing, as I may have accidently included a new bug or 2. Also, there's lots of cleanup to be done yet. But at least you can try it out and look for bugs.

Also, the Samples column is changed. It used to say "Yes" if the game used samples (even if they were missing), and "No" otherwise. Now it says "-" if it doesn't use samples, "Yes" if it uses samples and they are there, and "No" if it uses samples but they are missing. There's no overhead because it gets the info from the cache.


oh, i don't know if you used "broadcast" for anything, but i'm killing it off.

Page 1 of 3 All times are UTC+02:00
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/