Commit Graph

1433 Commits

Author SHA1 Message Date
Zach Bacon 179987f8c4 Merge pull request #27 from rkitover/master
fix backcompat on unix for config brkn in 7a7a72f
2016-10-23 17:05:46 -04:00
Rafael Kitover 0192d9a362 simplify DrawingPanel classes w. dynamic_cast<>
Use dynamic_cast<wxWindow*>(this) in the DrawingPanel abstract class to
implement GetWindow() and Delete() so that all concrete classes do not
have to duplicate the code.
2016-10-23 11:38:54 -07:00
Rafael Kitover d543217f6a fix backcompat on unix for config brkn in 7a7a72f
Only load config files with the app name set to "visualboyadvance-m" on
Windows and Mac, on unix keep the default of "vbam" for now so that
users' ~/.vbam directories are found correctly.

TODO:

* migrate all of this properly to XDG paths on unix, giving users the
  option to move their config
2016-10-22 17:26:05 -07:00
Zach Bacon db85f54b1c Merge pull request #26 from rkitover/mac_hidpi
Mac OS X HiDPI fixes + other misc
2016-10-22 11:04:03 -04: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
Zach Bacon 258c7fec40 Merge pull request #25 from rkitover/master
rebind toggle fullscreen on mac
2016-10-18 17:35:40 -04:00
Rafael Kitover 61b1af9e16 rebind toggle fullscreen on mac
On OS X, the F11 key is by default bound to "show desktop", so is a poor
choice for the "ToggleFullscreen" accelerator.

The default key combo to take apps fullscreen should be Ctrl+Cmd+F
according to:

https://support.apple.com/kb/PH18744?locale=en_US

Fortunately, this was very easy to fix by using the "platform" attribute
in MainMenu.xrc .

NOTE: this does not give us "real" OS X fullscreen yet, where the app is
on its own space, like native fullscreen apps. In the future it would be
nice to add an option to do this.
2016-10-18 07:02:47 -07:00
Zach Bacon 153a5bf686 Merge pull request #24 from rkitover/master
make OpenGL default render method on OS X
2016-09-23 22:16:07 -04:00
Rafael Kitover 98e82247fc make OpenGL default render method on OS X
Currently the "simple" render method is way too slow on OS X, while
Cairo is completely broken. The OpenGL renderer, on the other hand, runs
with almost no stuttering.

Also fix dangling icon file after OS X build.
2016-09-22 11:00:47 -07:00
Zach Bacon 30801e1554 Merge pull request #23 from rkitover/master
improve OpenAL support on Mac and make it default
2016-09-20 20:38:38 -04:00
Rafael Kitover cc7394f730 improve OpenAL support on Mac and make it default
Fix the dynamic library path for OpenAL to the framework included with
OS X.

Make option initialization set the AudioAPI to OpenAL on mac by default,
since SDL sound is currently completely broken.

There is a lot of stuttering, will have to look at that next.
2016-09-20 05:24:25 -07:00
Zach Bacon 9b65a9cf29 Merge pull request #22 from kookerus/PR
Added cast to uint8
2016-09-09 06:59:28 -04:00
Zach Bacon b80ea69a12 Merge pull request #21 from sundhaug92/master
GDB: Range-checking for 'p' and 'P' ops
2016-09-09 06:59:04 -04:00
Taylor Rose 294296b226 Added cast to uint8 2016-09-08 18:08:23 -04:00
Martin Sundhaug 6176a57d81 Merge https://github.com/visualboyadvance-m/visualboyadvance-m 2016-09-07 18:49:54 -04:00
Martin Sundhaug 9ad1506ed7 GDB: Range check register in remoteReadRegister and remoteWriteRegister 2016-09-07 18:29:57 -04:00
Zach Bacon f295f726b0 Merge pull request #20 from sundhaug92/patch-1
Fix: Typo in GDB implementation
2016-09-03 17:23:48 -04:00
Zach Bacon 03655a465f
Fix some compile issues and desktop launcher issues 2016-09-03 17:07:30 -04:00
Martin Sundhaug a80209e9b9 Fix: Typo in GDB implementation 2016-09-03 22:39:55 +02:00
Zach Bacon 1eb768578b Merge pull request #19 from jayands/master
Fix for T2
2016-08-09 10:12:13 -04:00
Jonathan Sifuentes e4354eedd2 Fix for T2
see: http://dev.vba-m.com/T2

> Every time I launch a server it defaults to the locahost IP instead of my
> actual IP. This is preventing me from linking with friends over Hamachi. When
> they enter my IP it errors on their end and they cannot connect. [report taken
> from <https://sourceforge.net/p/vbam/bugs/219/>]

Also, by chance, added the build folder to `.gitignore` so as to not pollute the
git repo.  I meant to do them as separate commits, but I forgot to do so.

Signed-off-by: Jonathan Sifuentes <jayands2k11@ymail.com>
2016-08-08 19:23:08 -07:00
Zach Bacon 5b7a9ea52c Merge pull request #18 from jayands/master
Small change: make `.clang-format` use C++11 Standard
2016-08-08 17:20:38 -04:00
Jonathan Sifuentes 4c4f76bd4a Small change: make `.clang-format` use C++11 Standard
I noticed this very small discrepancy, and so I changed it.  The `CMakeLists` is
already using C++11 standard, but the `.clang-format` was not.

Signed-off-by: Jonathan Sifuentes <jayands2k11@ymail.com>
2016-08-08 13:42:19 -07:00
Zach Bacon a986b42e23
Some formating things 2016-07-31 19:55:24 -04:00
Zach Bacon 84650620c2
Some formating and markdown changes (fingers crossed) 2016-07-31 19:52:56 -04:00
Zach Bacon be25a2155b
This should fix the update issue, I'll release a test binary soon. 2016-07-31 09:30:16 -04:00
Zach Bacon bba13d30a6
Minor compile issue, should be pretty much the last of it, next is the update check. 2016-07-31 09:13:14 -04:00
Zach Bacon 7153bc7d92 Merge pull request #16 from EoD/fix-linux-build
Fix various Linux build issues
2016-07-31 08:20:46 -04:00
Zach Bacon eaa198b360 Merge pull request #17 from EoD/fix-cmake-for-linux-build
Set requirement to C++11 in cmake
2016-07-31 08:18:16 -04: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
EoD 6612d34ddf Fix SDL.h includes
See comment in FindSDL2.cmake:
 Note that the header path has changed from SDL2/SDL.h to just SDL.h
 This needed to change because "proper" SDL convention
 is #include "SDL.h", not <SDL2/SDL.h>. This is done for portability
 reasons because not all systems place things in SDL2/ (see FreeBSD).
2016-07-31 00:11:21 +02:00
EoD 3b520ee202 Add missing OpenGL header
Fixes an issue with GLuint not defined
2016-07-30 23:56:33 +02:00
EoD 645be4522c Add missing wxWidget includes 2016-07-30 23:56:17 +02:00
EoD 6ce43f90b9 Fixes build issue if VERSION has not been defined 2016-07-30 23:55:57 +02:00
EoD 3cf6c2ca7b Fixes memgzio with zlib > 1.2.3.8 2016-07-30 23:55:00 +02:00
EoD 3f5f9adbe9 Update 7z code to SDK 9.22
This fixes some Linux compile errors
2016-07-30 23:53:39 +02:00
Zach Bacon 0573351a65 Merge pull request #15 from ElementW/typemess
Remove typedef'd standard int types
2016-07-29 20:47:14 -04: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
Dorian Wouters 37f0e75c45
Fix standard int types, prefix gb {C,H,N,Z}_FLAG with GB_ 2016-07-29 09:45:38 +02:00
Zach Bacon 4d3d2b7951
Gba inline fixed up, will try and get things done during the weekend 2016-07-23 09:32:49 -04:00
Zach Bacon ba57da76cb
You must be getting tired of this. I know I am. 2016-07-23 08:10:45 -04:00
Zach Bacon 8106b77056
Added a todo list 2016-07-23 07:59:34 -04:00
Zach Bacon f86fafbe62 Merge pull request #13 from SwooshyCueb/pr-4
Fix a casting error in GCC 6
2016-07-22 22:09:17 -04:00
Zach Bacon 228c298df6 Merge pull request #14 from MrJman006/patch-1
Fixing U16 and U8 Parameter Types
2016-07-22 22:09:07 -04:00
MrJman006 9dd9fd5d26 Fixing U16 and U8 Parameter Types
It seems like most of the types are moving to fixed width integer types and this file wasn't fully converted.
2016-07-21 22:01:49 -04:00
Markus Kitsinger (SwooshyCueb) b6828f62cf Fix a casting error in GCC 6 2016-07-21 13:27:18 -05:00
Zach Bacon ba3083b538
Expect more of these type of messages till all is done 2016-07-09 22:08:20 -04:00
Zach Bacon 79820311d3
I could go on, but really this is just more typedef removal 2016-07-09 21:38:43 -04:00
Zach Bacon 5f73631f84
Eeprom is done 2016-07-09 17:34:55 -04:00
Zach Bacon 590dd281dd
finished the cheat files 2016-07-09 17:24:11 -04:00