Anthony J. Bentley reports that desmume does not compile
on OpenBSD when the hud is enabled in bug #3148356.
After a few he reports that Stuart Henderson of OpenBSD
found the problem. The macro definition of ALIGN() conflicts
with a definition in /usr/include/machine/param.h.
So rename ALIGN macro to DS_ALIGN.
When the user uses an external firmware image, there is a
call to getpathnoext() in firmware.cpp:571 in order to
generate a file name for the saved firmware config file.
The size of the MMU.fw.userfile char buffer is only 260,
as declared in mc.h:73. However, getpathnoext() expects
the buffer size to be MAX_PATH, which is declared as 1024
in types.h:77. The buffer overflow occurs in path.h:293
with the call to strncpy(), which copies 1024 chars into
MMU.fw.userfile, which is only 260 chars.
This patch fixes this bug by setting the MMU.fw.userfile
char buffer to a size of MAX_PATH. This is consistent with
the char buffers used for the other file names.
From rogerman, #3328686
NSMB gets one step further. When Luigi receives Mario's data frames, he tries to use port 094 (REPLY1) to respond, but only writes zero there for whatever reason.
user heftig says that he can't find Agg_init() at link time when he uses
--enable-hud. Fix AM_CONDITIONAL to check for the proper variable and to
set in true only if --enable-hud was set.
Relayed by zeromus in a comment in #3250391
satelight reports the menu item position for savestates does
not match the slots they are saved.
As zeromus explains the pattern should be:
F1 saves to ds1
F2 saves to ds2
F10 saves to ds0
recent savestates list looks like:
1 myfile.ds1 F1
2 myfile.ds2 F2
...
0 myfile.ds0 F10
Based on a patch from satelight.
Jan reports that if you call reset when a game is paused
the statusbar would wrongly report the game as playing
when it is actually paused. Jan's attached patch removes
the call to desmume_resume() and the status bar update.
I think the intent here is different and the plan was to
reload the game so just call Launch directly as already
Jan noticed it would do the right thing.
Based on a patch from Jan Bücken (nooris), #3288654
xrmx: kept only the hunk that pause and not the one
that reenable the previous state, i think we should
stay paused and the user should act to continue
playing.
Based on a patch from: Jan Bücken (nooris), #3301520
This is not portable on windows and actually it's not even
working here. Anyway it should be working for Jan
otherwise it wouldn't have posted the patch right? :)
From: Jan Bücken (nooris), #3301520
Spring cleanup:
After this patch the file wxMain.cpp is ordered as follows:
1) header
2) includes
3) vars (and defines)
4) the wx oninit function that every wx project needs
5) the desmume class functions
5a) for functionality and events (e.g. for clicks on buttons, etc...)
5b) to load the menu
6) the wx event table
[xrmx: i hate these labels before code :)]
From: Jan Bücken (nooris), #3301520
We have a fair chunk of duplicated code to build the GUI
menus, remove the monolithic one in favour of the one
splitted in smaller functions.
From: Jan Bücken (nooris), #3301520
Move the path stuff that is different between platforms
to an helper in order to share the common code.
The !WINDOWS should receive a bit more love though.