Commit Graph

163 Commits

Author SHA1 Message Date
Rafael Kitover 2b45cc7662 fix typo in CMakeLists.txt from 7a7a72f
Fix typo in the default cpp flag when CMAKE_BUILD_TYPE is "Release"
from `-NDEBUG` to `-DNDEBUG`.
2016-10-24 13:12:40 -07:00
Rafael Kitover 7a7a72f2bd Mac OS X HiDPI fixes + other misc
Use a high-res surface on HiDPI (e.g. retina) Macs for the OpenGL
renderer, and scale window accordingly. Also fix fullscreen toggle not
working in HiDPI mode. And some other stuff.

Aside from the .app not being linked statically, the app is now fully
functional on Mac and ready to ship.

Full change details:

* add -DDEBUG or -DNDEBUG based on CMAKE_BUILD_TYPE (-DNDEBUG for
  Release and -DDEBUG for Debug)

* properly search for homebrew/macports/fink directories, and only add
  them if they exist

* fix building with wx debug support, when available

* use explicit OpenGL context on Mac too for new versions of wx

* add main_frame pointer in GameArea back to MainFrame, and a
  SetMainFrame(MainFrame* parent) public method to set it in guinit

* add full support for reading and writing double value config options
  (the GUI still needs to be updated for options that can take doubles,
  such as video_scale)

* change video_scale option (Display/Scale) to a double, putting a
  double value such as 3.6 in the config file works correctly

* add a HiDPIAware mixin class for GameArea and DrawingPanel, with the
  method HiDPIScaleFactor which returns the current window's
  backingScaleFactor

* change the GameArea sizing methods (DelBorder(), AdjustMinSize() and
  AdjustSize()) to divide the window size by the
  HiDPIAware::HiDPIScaleFactor so that the window is scaled properly

* change GameArea::ShowFullScreen to ignore fullscreen events for a
  maximized window on Mac, because maximized windows on OS X are
  actually native fullscreen windows

* change scale variables to double from int, and use std::ceil() to
  round scaled pixel or memory size values

* make a default base class DrawingPane::DrawingPanelInit() virtual
  method, call by all concrete class constructors based on the did_init
  flag

* call setWantsBestResolutionOpenGLSurface:YES on the view backing the
  wxGLCanvas for the OpenGL renderer (GLDrawingPanel) to get a high res
  OpenGL surface in HiDPI mode

* remove GLDrawingPanel::OnSize event, the OpenGL viewport resizes
  automatically without the need to call glViewport()

* do not hide the mouse pointer if the main frame has menus or dialogs
  open

* add variadic vbamDebug(const char* format, ...) function, active only
  #ifdef DEBUG, which sets the wx log target to STDERR and logs a
  message to it

* use full name of app "visualboyadvance-m" instead of "vbam" when
  getting configuration paths, this way the config is saved to
  ~/Library/Application Support/visualboyadvance-m rather than
  ~/Library/Application Support/vbam

* listen to the MENU_HIGHLIGHT_ALL event as well, as an extra way to
  check when the menus are open

* add public MainFrame::SetMenusOpened(bool state) method to force the
  main frame to change the internal menus_opened state, this is
  necessary because in HiDPI mode on Mac the keyboard accelerator for
  toggle fullscreen sends a menu open event, but not a menu close event,
  so on switch to fullscreen the state is changed to menus closed and
  the emu is unpaused

TODO:

* GUI option to change toggle fullscreen behavior between native and
  non-native fullscreen on Mac

* GUI support for double config values like Display/Scale

* add HiDPI support to simple renderer

* fix SDL sound, or disable the option

* fix Cairo suport on Mac, or disable the option

* use dynamic_cast<> to implement GetWindow() for DrawingPanel instead
  of pure virtual method, likewise for Delete()

* link .app statically by default so it can be shipped

* add Homebrew formula
2016-10-22 05:47:27 -07:00
EoD a513d3191e Add C++11 in cmake as default
Currently, the build is broken on Linux as fixed width integers (for
example uint32) are used via <cstdint> without a namespace. This is only
allowed in C++11 and later.

See http://en.cppreference.com/w/cpp/types/integer for details.
2016-07-31 01:03:40 +02:00
Dorian Wouters 31391e090c
Kill common/Types.h, replace its old typedefs w/ standard types
Fix includes in files using standard int types
Fix wxWidgets UI includes
Silence some unused variable warnings in GBA-arm.cpp macros
2016-07-29 11:07:11 +02:00
Markus Kitsinger (SwooshyCueb) 57c619ca13 Add some header and resource files to CMakeLists.txts (Core+WX)
This makes these files show up in generated CodeBlocks projects, which
makes life easier for folks who import into QtCreator.
2016-06-07 15:26:53 -05:00
Zach Bacon c8343267fc <wip> Migration to SDL2 made possible by galtgendo, gtk changes to follow. 2015-11-18 21:34:38 -05:00
Rafael Kitover 3d679c1469 more minor improvements for OS X build
Add Homebrew and MacPorts paths for findings headers and libraries.

Add -x objective-c++ to the C++ compile command so that conditionally
compiled ObjectiveC code for OS X can be supported.

Throw a fatal error if the user tries to enable ENABLE_ASM_CORE,
ENABLE_ASM_SCALERS or ENABLE_MMX on AMD64, as this is not supported yet.

If ENABLE_ASM_SCALERS is enabled, try to find a Homebrew or MacPorts
nasm before using the outdated XCode nasm.

For the future, if the user has only the old XCode nasm which does not
support 64 bit objects and the build is 64 bit, throw a fatal error.

For 32 bit builds with the old XCode nasm, use -f macho instead of -f
macho32, which is used if the version of nasm is > 2.0 .

Pass -DMACHO instead of -DELF and, on AMD64 (for the future) -D__AMD64__
for nasm on OS X.

Pass -D__AMD64__ to C++ compilation as well on AMD64, this will help
when we support AMD64 inline assembly.

Add support for automatically linking Homebrew keg-only gettext from
/usr/local/opt/gettext for ENABLE_NLS.

Fix copying Info.plist and vbam.icns to the .app bundle.

Add a key to the Info.plist to support sharp text on retina displays, as
per:
https://wiki.wxwidgets.org/WxMac-specific_topics#Retina_display_support

Set wxWidgets_USE_DEBUG to ON if CMAKE_BUILD_TYPE is "Debug". I'm not
sure this does anything or if I'm doing this correctly though.

Also set wxWidgets_USE_UNICODE to ON. Again, I'm not sure this does
anything or is in the right place.

Fix a bug in the config dir finding code in
wxvbamApp::GetConfigurationPath() updated in 8b8f2f7 to only use the
more top level dirs if there is a vbam.ini in them, not if they are
writable as well, and use the reverse order (starting with user local
dirs) to check for writable dirs and their writable parents. This fixes
a problem with the vbam.ini being written to the Plugins directory of
the .app bundle if it's writable instead of ~/Library/Application
Support/vbam as was intended.
2015-11-16 21:56:23 -05:00
DoctorWho11 1e1b1cc35c This should fix the issue of when users on linux run the install command and make not finding the proper binary. 2015-09-29 23:49:15 -04:00
skidau 023d28a9cc OSX build fix by Juha Laukkanen. This one works with wxWidgets 3.0 and Cairo 1.14.2. 2015-07-11 10:34:27 +10:00
DoctorWho11 3389ba5cd6 make cpack ignore the dep folder 2015-06-15 09:20:20 -04:00
DoctorWho11 65f7546798 rename exe and added more cpack stuff. 2015-06-15 09:00:47 -04:00
DoctorWho11 f5600cef71 setting the exe name and git hash 2015-06-15 08:21:44 -04:00
DoctorWho11 2717803745 added git support to cmakelists.txt 2015-06-12 08:04:26 -04:00
DoctorWho11 0064fe114f will need to start changing the version for git 2015-06-12 07:51:15 -04:00
DoctorWho11 f5c1dec56c pathing issues 2015-06-11 22:14:33 -04:00
wowzaman12 5a6ed061a4 removed the cmake toolchain file, modified the cmakelists files to include an additional library to properly link with sfml and for linking statically with libgcc and stdc++ libs via mingw 2015-05-28 15:12:31 +00:00
wowzaman12 09e485dcad some changes regarding static building via mingw 2015-05-21 18:42:02 +00:00
wowzaman12 ac3abd7bb3 so that xaudio2 can be enabled 2015-05-18 03:05:58 +00:00
wowzaman12 f8ccda09ac try and get mingw to force static gcc and libc++ 2015-05-18 03:04:34 +00:00
wowzaman12 62ce4aa50a You didn't see us change the version to 2.0.0 *waves hands mysteriously* 2015-05-18 02:41:21 +00:00
skidau 6605d4eb6d Installed man pages on unix-ish platforms. Patch by Mook. 2015-05-18 00:28:34 +00:00
wowzaman12 96788892c4 Fixed cmake to use find the proper xpm file in the xrc folder, also made the vbam core and fex library static to help with building on some platforms. 2015-05-10 22:54:19 +00:00
skidau df42b279ed Removed an extraneous include and added a SDL build check in the CMakeLists.txt 2015-05-09 14:09:29 +00:00
skidau f3e35d16a1 Updated the FindSFML cmake script to the SFML-2.2 version 2015-05-06 01:27:09 +00:00
skidau 5a9015b3f0 Created a common configuration system. 2015-04-18 06:53:55 +00:00
wowzaman12 d1bdd8b566 Just added a small cpack routine to make a zip file of the binaries. 2015-04-05 04:28:40 +00:00
skidau 55e1dad514 Integrated the VBA-SDL-H2 code into the GDB function.
This allows breakpoints, memory views and watches to be controlled from the GDB interface.  The VBA-SDL-H2 commands can be entered via the GDB monitor (type "help" into the monitor for a list of commands).  Made minor changes to the GDB interface so that the GDB port does not need to be entered every session.  A "Break on Load" option has been added allowing GDB to be connected before the ROM starts executing.

VBA-SDL-H2 credits: Labmaster, kenobi, DevZ, richq, JPAN, Griever
2015-04-02 05:53:57 +00:00
skidau a65204d54f Added E-Reader scan support by CaitSith2.
One thing it does, is correct any raw files scanned, if they are correctable. (usually, uncorrectable raw files come up with a read error.)  There is also bin support included as well. (Note, if you open a valid dotcode bin, it will encode it to raw, and save the freshly encoded raw file if it has been set in the menu. If the dotcode save file has not been set, the bin will still load.)

Currently, part of the GBA emulation breaks the E-Reader scan code. The reader always returns a Region Error.
2015-03-27 22:50:11 +00:00
wowzaman12 dc3b921700 cmakelists changes, wxwidgets interface build fix to follow. 2015-03-27 17:48:42 +00:00
squall-leonhart 65a976a8cc XBRZ 1.2 added as a built in filter 2015-03-19 01:44:47 +00:00
kode54 2d9685596d Disable link by default now that games work without it 2013-09-24 11:49:26 +00:00
bgk d6cf243545 CMake: Disable ffmpeg support by default since it is only used by the WX port which is disabled by default 2012-10-03 18:00:45 +00:00
bgk e296c98a7e CMAKE: sem_timedwait is found in pthread on newer linuxes 2012-09-07 19:09:16 +00:00
kode54 9bf5a9a17f Added support for detected FFMPEG include path 2012-05-23 06:19:44 +00:00
bgk 0221929951 CMake: Enable GBA linking by default. Fixes Sonic Advance 2. 2012-02-06 10:28:46 +00:00
squall-leonhart 2908c33111 shuffles magic mush...... trunk MSVC2010 buildfix 2012-01-20 22:03:27 +00:00
bgk 7a17e5f320 CMake: Disable building the wxWidgets port by default since it is not supported yet. 2011-12-28 11:56:07 +00:00
bgk 9ca7db29f5 SDL: Install vba-over.ini in the data directory and use it. 2011-12-28 10:23:38 +00:00
bgk 0b3940ff3f CMake: Fix building outside of a working copy when subversion is installed. 2011-12-27 21:02:22 +00:00
bgk 244e4e85d8 SDL/WX: Fix build with asm scalers enabled.
If Win32 has issues with OpenGL those should not be hacked around in common code.
2011-12-03 13:47:20 +00:00
squall-leonhart 8e6a51211e all current vba-m Wx patches applied to trunk. 2011-05-25 11:55:46 +00:00
squall-leonhart f3b7ead629 sdl patched 2011-05-24 07:49:00 +00:00
squall-leonhart 98215cfb30 buncha patches by darktjm
sdl fix not applied yet
2011-05-24 07:39:29 +00:00
bgk 4a9bf47455 CMAKE: Do not override system C/C++ compiler flags when no build type is defined. This will make things easiers for packaging. 2011-02-26 12:11:06 +00:00
bgk a8c1e753b1 GTK: Merged the GB and GBA cheat list dialogs. Patch by unmacaque. 2011-02-26 10:06:32 +00:00
bgk 5c61339992 GTK: Add GameBoy cheats support. Thanks to unmacaque for the patch. 2011-02-25 17:56:10 +00:00
bgk 8f412ed1c4 GTK: Add vba-over.ini support 2011-02-24 19:34:56 +00:00
bgk 9ac1c29a12 GTK: More NLS WIP 2011-02-24 17:46:59 +00:00
bgk 1474f6e50b GTK: More NLS WIP 2011-02-24 17:01:10 +00:00
bgk b94eae1925 GTK: NLS support WIP 2011-02-24 13:06:17 +00:00
bgk b1e4319c26 CMAKE: Clarify CMakeLists.txt a bit 2011-02-24 11:14:59 +00:00
bgk 924f9f6492 GTK: Remove the StringTokenizer class and move the functionality to tools.cpp 2011-02-22 18:04:08 +00:00
bgk b213ae372b GTK: Turned the last menu based settings into a dialog 2011-02-20 19:03:38 +00:00
bgk 8c0ea991c8 GTK: Added GBA cheats support. Thanks to unmacaque for the patch. 2011-02-20 14:53:04 +00:00
bgk 56431351d5 CMAKE: Use built in support for ASM compilers. Bump required version to 2.6.0 2011-02-20 13:31:49 +00:00
bgk 6c80badb98 CMAKE: Allow building without SFML 2011-02-20 12:22:58 +00:00
bgk 9962e4e679 GTK: Convert the remaining parts of the UI from Glade to GtkBuilder. Thanks to Rafał Mużyło for the patch. 2011-02-20 08:28:48 +00:00
Squall-Leonhart 341df897ca linux build fix, pushed to svn. 2011-01-05 21:38:04 +00:00
shuffle2 f6b049bb2f fix the cmake/linux build
moves dependencies/File_Extractor-1.0.0 to trunk/fex - we can't expect people to have this lib, and fex has dropped support for the "fex_mini".
2010-03-15 03:36:45 +00:00
bgk f800bf8b0b GTK+ / SDL : fixed build 2009-10-09 14:47:41 +00:00
bgk e5794be79b Applied patch 2868577 by fernandotcl.
The changes are :
- debian/control: Build-Depends now include nasm for i386 and amd64
- debian/control: Architecture is now "any"
- debian/rules: Less verbosity when DH_VERBOSE is not set
- debian/rules: -DUSE_ARM_SCALERS=ON -DUSE_ARM_CORE=ON on i386 and amd64
architectures
- CMakeLists.txt: Out-of-source builds using USE_ARM_SCALERS is now
working
2009-10-04 06:43:20 +00:00
bgk 0354e4aa06 GTK : Removed the XVideo renderer since it was badly written, and OpenGL
does a better job in all cases now.
2009-03-19 10:41:38 +00:00
bgk 628d618662 GTK : New GBA settings dialog 2009-01-24 10:09:10 +00:00
bgk 1543a02585 GTK : Introducing the new Game Boy config dialog 2009-01-06 21:20:18 +00:00
bgk 417cfc2184 Fixed build with asm scalers 2009-01-04 09:03:26 +00:00
bgk db8ec308dd Moved more GBA specific code to the gba folder. 2009-01-01 16:11:02 +00:00
bgk ba89436ad2 No more cryptic names ... 2009-01-01 15:20:03 +00:00
bgk 716d9feab0 No need to use cryptic names 2009-01-01 14:52:03 +00:00
bgk 4004472458 Moved the APU files up by one level, since they are shared between the GB and GBA cores. 2009-01-01 14:43:18 +00:00
bgk 6c6e4a8b97 Moved some files to the common folder. 2009-01-01 14:21:18 +00:00
bgk f1199d4533 Moved the filters to their own directory. 2009-01-01 13:02:35 +00:00
bgk 2b3a6f8c9b New sound driver framework. Made the SDL and GTK+ frontends use it. It will help cleaning up the sound related global variables hell. It should be easy enough to port the sound drivers of the MFC frontend to it. Now if someone could do it, it would allow using the sound drivers directly from the core, removing the C wrappers and a lot of global vars. 2008-12-26 12:19:33 +00:00
bgk 753b72123d GTK : Replaced the sound configuration menu by a dialog 2008-12-23 13:51:48 +00:00
bgk 4326e70026 CMake : Fixing build for Ubuntu 8.10 (and probably others newer distributions) 2008-11-04 14:48:25 +00:00
bgk 0c4eddbf24 GTK : Missing file in previous commit 2008-10-28 09:45:35 +00:00
bgk 0656b44a39 GTK : WIP display config dialog 2008-10-27 19:48:33 +00:00
spacy51 f879d81040 FIXED: Added PNG include dir 2008-10-20 16:30:07 +00:00
spacy51 279c498d62 corrected typo 2008-10-20 13:40:29 +00:00
spacy51 b29789d8b7 REMOVED gbafilter.cpp/h because it was not used anywhere 2008-10-18 14:15:48 +00:00
spacy51 89c0a7b049 Patches by chrono:
[CORE] Add UPS/PPF patch support
[SDL] Add UPS/PPF patch support
[SDL] Fix memory leak
2008-10-16 13:56:49 +00:00
bgk 6d1984a81d GTK :
Moved the directories config dialog to a separate file.
2008-09-26 18:25:23 +00:00
bgk 2af55d0f0b GTK :
- Changed the config file location to follow the freedesktop.org XDG Base Directory Specification. There is no point to be compatible with the old location since we haven't made a release yet.
2008-09-26 17:23:12 +00:00
bgk af20e7396f CMAKE : Fix out-of-source build/install (patch by chrono) 2008-09-13 16:49:34 +00:00
bgk d2a3440968 CMake : Removed the mtune=native from the CFLAGS to make packager's lifes easier. 2008-09-03 07:39:13 +00:00
bgk 51efd70d2c SDL : Fix build on OSX, thanks to KunaiTeam 2008-09-03 06:45:24 +00:00
bgk 474231f6bb SDL :
- Renamed the configuration file to vbam.cfg to avoid conflict with the original VBA (thanks to tttttttttanaka for the patch)
- Changed the window title to VBA-M
2008-09-02 06:16:34 +00:00
bgk 63fba2be26 GTK : Started hooking up the SDL input code. The events are well transmitted to the input module but the GDK code is still used. WIP. 2008-09-01 19:14:37 +00:00
bgk 4e454fcb86 SDL:
Started factoring out the input code to a new file. Only moved code at this point. The ultimate goal is to reuse this code for the GTK port.
2008-08-30 17:50:51 +00:00
bgk 24ed04f8f1 GTK:
Removed the Keymap class
2008-08-30 15:02:01 +00:00
bgk 5e5d025fd5 GTK:
- Removed the PortAudio sound driver because it was quite unstable on some systems
- Use the SDL sound driver
- Fixed the SDL include path
2008-08-29 19:45:17 +00:00
bgk ccfed5c1c3 SDL:
- The expression parser/lexer is SDL specific, moved it to the sdl folder
- Readded the flex/bison source files from VBA's CVS
- Rebuilt the parser/lexer from source
2008-08-29 10:23:51 +00:00
bgk de99887998 CMake : Use gtkmm library path from pkg-config 2008-08-27 15:01:38 +00:00
bgk f5c7bb5d28 GTK :
Fixed build by removing obsolete sound options

SDL :
Still broken
2008-08-27 11:47:52 +00:00
xkiv 5b5f0078fe SDL build/configuration patches (martinultima, chrono):
http://vba-m.ngemu.com/forum/gbc-cheats-gameshark-compile-fixes-t-193.html
2008-08-03 21:02:37 +00:00
mudlord eac8b888a3 ADDED LIRC support in SDL build 2008-07-10 23:41:29 +00:00
bgk 2bd3eadac0 Allow building the GTK port without debugger support 2008-06-16 20:18:49 +00:00
n-a-c-h 4e514ca2a2 Squash some warnings. 2008-06-09 19:49:02 +00:00
bgk 66047ce32c Fixed CMake 2008-06-08 20:46:25 +00:00
bgk 57010363cd Silence CMake warnings 2008-06-06 18:56:41 +00:00
bgk 704d763163 Fixed CMake for cross-compiling 2008-06-06 16:42:31 +00:00