We are not going to release 32 bit mac builds anymore, because any mac
sold after 2007 will run a 64 bit binary. And since we are building for
10.7, which requires a 64 bit mac, and will run 64 bit binaries even on
a 32 bit kernel, the 32 bit binary was always pointless.
More on this here:
https://apple.stackexchange.com/questions/99640/how-old-are-macs-that-cannot-run-64-bit-applications/99644#99644https://apple.stackexchange.com/a/261793/206363
Remove references to 32 bit mac binary from the dev manual.
Builder updates:
- Bump cmake 3.13.0-rc1 -> 3.17.3. This is needed for the new
FetchContent feature in cmake, which we use for Sparkle (online
updates for mac.)
- Bump sfml to newer master commit.
- Add pre-build hook for libvpx on mac to set
-mmacosx-version-min=$MACOSX_DEPLOYMENT_TARGET in CFLAGS.
- Force C locale in all builder scripts, homebrew bash was erroring due
to some kind of locale bug with a non-English locale.
- Remove .app in build_project() before building, rebuilds were failing
due to reinstallation of frameworks (Sparkle.)
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Minor code improvements.
Do not suppress output of sudo invocation, this may cause it hang on an
invisible password prompt.
- Fix#676.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
In the Turbo config dialog, remove the selection list for entering the
value and leave only the spin control. Allow values above 600%, up to
4000%.
Reintroduce the speedup_frame_skip config variable, defaulting to 9, use
it for turbo selection values > 600%, with speedup_throttle == 0.
The rationale for this is that on average modern hardware, throttle
values above 500% or 600% will not be effective.
The default is now shown as 1000%, which is:
frame_skip == 9 && speedup == 1,
where:
speedup == 1 is equivalent to throttle == 0,
as was the case before the turbo config changes.
Values above 600% are automatically rounded up or down to the nearest
100%, on entry and on click of the up/down arrows of the spin control.
The frame skip checkbox is cleared and disabled for the "Unlimited"
setting (throttle == 0), and set and disabled for values > 600%, to
reflect the mechanism to the user.
When the value again enters the modifiable range in the spin control,
the previous value of the checkbox is restored.
Misc:
- Turn off translation of percentage values in the xrc.
- Remove the size element for the throttle selection list in the general
config dialog xrc, it breaks the layout on GTK3.
- Add a note about passing wxWidgets_CONFIG_EXECUTABLE to cmake to
select wxWidgets version to README.md.
Hopefully this will reduce confusion and present a nicer UI.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Followup on 07064c87.
Use codesign --deep to sign the .app before signing all the frameworks,
otherwise codesign will refuse to sign the app due to unsigned dylibs
when not making a static build.
The error is:
./visualboyadvance-m.app: code object is not signed at all
In subcomponent: ...libtheoraenc.1.dylib
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Create and enable auto-updater for MacOS using `Sparkle=1.23`. We need
to sign our app using an `Apple Developer Key` for it to work properly,
since we are not going to sign updates with the Sparkle key.
Add all auto-updater files to `gettext`'s pot.
Use `str_split` to always get related stable version. We do not want
to check for nightly builds.
For Windows, we create the flag `-DHTTPS` to select between using an
HTTPS or HTTP URL for the auto-updater checks. We use this to keep
support for Windows XP (HTTP only) while all others should be HTTPS.
Also, use `::FreeLibrary` to allow us to remove the temporary file
that stores the `WinSparkle.dll`. Previously, we could not get it to
work with `wine`.
We upgrade only the first listed package to upgrade for vcpkg to not
overrun the CI time limit.
Sometimes these packages are up-to-date but are listed for rebuild due
to depending on other packages that would be upgraded.
Find the first package in the upgrade list that is not up-to-date and
use that as the package to upgrade.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Add support for non-GameController SDL Joysticks.
Add proxy class wxSDLJoyDev to support using either SDL_GameController*
or SDL_Joystick* values in joystate.dev.
Add pretty much identical SDL code to support SDL_Joystick* when the
device cannot be opened as an SDL_GameController*, without changing the
API. SDL_Joystick* devices operate almost identically to SDL_Controller*
devices with their own default mappings, for both events and polling.
Filter axis motion events in the bindings editor widget for subsequent
events within 300ms. This gets rid of the double binding for +1/-1 when
the stick is moved to a direction.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Add ui/hideMenuBar boolean option, defaulting to on, which hides the
main menubar when the mouse is idle or outside the frame.
This is disabled on mac, because on macs the main menubar is not part of
the application window.
Fix pointer hiding/unhiding by connecting panel events to the gamearea
mouse event handler.
Clean up the pausing when menus are opened code, make it actually work
on Windows.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
When toggling "retain aspect ratio", destroy the drawing panel so it is
recreated with the desired aspect ratio settings.
Only add the vertical spacers when aspect ratio is on, they are not
needed when it's off.
Set the sizer priority of the DrawingPanel to 1 if aspect ratio is off
so that wxEXPAND always works.
Clear the GameArea sizer when attaching a new DrawingPanel, this is so
that the vertical spacers used when aspect ratio is on are not included
when aspect ratio is off.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
MBC30 is a variant of MBC3 with a 4MiB ROM size and a larger RAM size.
https://gekkio.fi/files/gb-docs/gbctr.pdf
Allow addressing 4MiB of the ROM in MBC3 ROM bank select if the ROM size
is 4MiB.
Fix provided by roytam1.
- Fix#652.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
We have some issues when trying to open files on Windows that contains
characters not included in the current codepage. Using `fopen` fails
when that happens.
One example is using the `pt_BR` codepage and then using a name with
japanese chars for the battery file.
The games and BIOS work since they use `blargg_open`. It converts a
`const char *` to `const wchat_t *` and uses `_wfopen` for windows.
(doing a multibyte to widechar conversion)
Since we want to avoid doing many code changes on our cores, we need
some `util*` functions for the matter.
Replace `mb_fn_str` by UTF-8 strings.
Replace all occurrences of `fopen` for `utilOpenFile` on GBA core.
Replace all occurrences of `fopen` for `utilOpenFile` on GBA e-reader.
Adjust e-readers calls on wx frontend.
Replace all occurrences of `fopen` for `utilOpenFile` on Patcher files.
Always apply UTF-8 when dealing with path strings.
On our wx frontend we should always send UTF-8 `char *` to our cores
functions. This way we can have consistency when dealing with them for
each platform.
On Windows, we will convert all multibyte to wide chars and use proper
functions for I/O operation.
Create function to deal with unicode calls of `gzopen`.
We use `gzopen_w` (`zlib>=1.27`).
Replace all occurrences of `fopen` for `utilOpenFile` on Config Manager.
Replace all occurrences of `fopen` for `utilOpenFile` on Cheat files.
Use proper functions for unicode on GB core.
Use function instead of macro for `UTF8()`.
Use `nullptr` instead of `NULL`.
Print wide char strings on status bar.
Fix throttle=0 (unlimited speed) settings for both the Speedup/Turbo
config panel and the general throttle setting and make 100 the default.
Replace the speedup frame skip option with a "Frame skip" checkbox,
which enables skipping the appropriate number of frames if vsync or very
low system performance is in effect. The systemFrameSkip (under video
config) is added to this value.
With speedup_throttle=100, the old speedup behavior is used with 9
frames skipped.
With speedup_throttle == 0 && speedup_throttle_frame_skip, skip 9
frames at full speed, which is exactly the same as the old behavior,
since throttle == 0 is equivalent to speedup == true.
Hopefully these changes will make the turbo config dialog more useful
for users, by default frame skipping to work around vsync will be
enabled, and users can uncheck the "Frame skip" checkbox for a smoother
experience.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Update openssl version, getopt URL and roll nasm back to stable, because
the snapshot hangs on Catalina.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Fix problem with the ZIP_SUFFIX option, which causes zip files to have a
suffix of "OFF" if the option is not set.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Since they share the filter function, but can change one from another
(setting on the GBA would apply to GB and vice-versa), we allow only
the proper setting to be toggled while a ROM is loaded.
If GB ROM, then `Options` > `Game Boy` > `LCD Filter` is enabled.
Likewise for GBA. If neither, then no option is enabled.
When we skip frames, we just don't draw them on our frontend. The
function `systemDrawScreen` also send the video frames to be recorded,
but only when called from the core.
Our solution creates a auxiliary `systemSendScreen` that only adds the
frame to the recording. It is called when the core decides to skip a
frame. This way we can get the video frame for recording, just like
audio ones are always sent.
The flag `wxST_NO_AUTORESIZE` does not behave well on our viewers. They
were being hidden due to not fitting the text box available.
On Windows, they were working as expected. It is unknown on MacOs.
XRC error: 131: vertical alignment flag `wxALIGN_BOTTOM` has no effect
inside a vertical box sizer, remove it and consider inserting a spacer
instead.
- Fix#517.
We already had `optFlashSize` for both SDL and WX ports. We assigned
this variable to replace all ocurrences of `winFlashSize`.
As a side note, this entire scope could/should be replaced by a better
auto-detect system for saving types. At the moment, it is only really
useful for the SDL port, since we have overrides for the WX port.
- Fix#585.