Commit Graph

40 Commits

Author SHA1 Message Date
Edênis Freindorfer Azevedo 0b14e9f885
[WINDOWS] Add function to open unicode files. (#644)
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.
2020-04-21 10:24:28 -03:00
Edênis Freindorfer Azevedo cd029ae696 Fix video recording with frame skip 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.
2020-03-18 00:48:43 +00:00
retro-wertz 27aeb6dc67 Re-add Types.h, remove some more #ifdef 2018-06-08 20:14:45 +08:00
retro-wertz 1606ea7482 libretro: Cleanup some #ifdefs 2018-06-06 16:20:32 +08:00
retro-wertz 3411aa33a4 libretro: Use stdint.h instead in most cases 2018-06-05 00:14:06 +08:00
Rafael Kitover 01200fadbd Mac OS X 10.7 (Lion) build and runtime support
Make a custom cstdint.h header file that includes <tr1/cstdint> if
<cstdint> is not available, because the clang 3.x used on Lion does not
have it. Change all references to <cstdint> to use it instead.

Add missing OpenGL header for older OS X in sdl/SDL.cpp .

When calling HiDPI methods, use respondsToSelector: to check if the
methods are available first.

Fix the bundling/linking script to support multiple copies of the same
dylib with different versions. Necessary to include both the Lion system
libpng and the brew libpng. Including the system libpng is necessary
because it is removed in later versions of OS X.
2016-11-03 10:49:13 -07: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
Zach Bacon 5bf44d19be
updated standards to webkit standard 2016-07-08 19:59:29 -04:00
skidau 4116a72ae7 Added rewind feature to GTK version. Patch by Juha Laukkanen.
There are two config params:

rewind_count_max => how many blocks are reserved maximum, higher value leads to greater memory usage naturally but longer rewind log
rewind_interval => default interval is 165ms and higher value leads to more inaccurate rewind but longer rewind log

Also fixes memtell() telling incorrect size because data is not flushed.
wxWidgets front end having too small buffer for rewinds resulting overflows.
2015-05-18 00:58:16 +00:00
skidau ad60e2cd67 Initial changes for compiling the wx build under Visual Studio 2015-04-22 00:02:29 +00:00
skidau 9dc7fbcfdb Split off the MFC code into its own project.
Added a command line project based on SDL.
Added getopt from MinGW.
Added SDL 1.2.15 to the dependencies.
Rearranged the OutDir and IntDir to Binary and Build folders.
2015-04-15 13:13:07 +00:00
skidau 0e5d12f070 Updated libretro to c0449e2c75650325aed7e7495a41f166d9ec0e7a (11/03/2015 7:03:18AM)
c0449e2c75
2015-04-14 10:39:21 +00:00
skidau e19d04c4fd Added Solar Sensor support from VBA-Wii.
Requires EEPROM+Sensor save type and Real Time Clock enabled.  The solar sensor can be controlled by the left and right motion sensor controls.
2015-03-26 09:08:30 +00:00
kode54 f4c26dcd95 Let's try that again. 2013-09-21 13:57:40 +00:00
squall-leonhart 3949de1b14 revert 1207-1210 as its not really ready for integration yet. 2013-09-21 02:42:37 +00:00
thibeaz bdf78c1247 libretro merge into trunk, the individual interfaces can still be compiled on their own so the gtk/sdl/mfc interfaces can still work as originally intended. Special thanks to Squarepusher of the libretro team for helping us get this merged 2013-09-20 21:08:23 +00:00
squall-leonhart 8e6a51211e all current vba-m Wx patches applied to trunk. 2011-05-25 11:55:46 +00:00
squall-leonhart 98215cfb30 buncha patches by darktjm
sdl fix not applied yet
2011-05-24 07:39:29 +00:00
bgk 2c2804aa60 SVN: Applied proper properties to all files, mainly to get native end of lines. 2011-02-19 21:33:53 +00:00
squall-leonhart e671d51d3c reupped untouched versions (pending proper migration of the sensor functions from VBA-GX 2009-10-22 21:31:51 +00:00
squall-leonhart d998964391 2009-10-22 21:26:06 +00:00
squall-leonhart 96868aa21b added rumble, and solar sensor to Core, however they will need to be properly exposed and integrated into the MFC/GTK/SDL interface ports at a later time. 2009-10-11 08:43:52 +00:00
bgk a9370648df This was apparently not used anymore. 2009-01-01 15:24:31 +00:00
bgk 6c6e4a8b97 Moved some files to the common folder. 2009-01-01 14:21:18 +00:00
bgk a67fe271a9 Fixed MFC for my previous commit 2008-12-26 20:11:33 +00:00
bgk 8bc8270984 Made the emulation core use the new sound framework. MFC is currently broken. 2008-12-26 19:33:19 +00:00
spacy51 ec3e07d6a8 even more beautiful code 2008-10-27 18:23:21 +00:00
spacy51 abb71b9b39 MOVE copyright/license text from the top of every code file to seperate 'License.txt' file. 2008-10-27 09:59:14 +00:00
spacy51 dcc2f30119 REMOVED second u8/u16/u32 typedefs 2008-10-16 11:46:58 +00:00
bgk c2a1300926 Completely remove systemSoundOn 2008-08-29 19:04:05 +00:00
bgk 65d9ca1d92 Initial version of the GTK GUI (forwardported from VBA's CVS) 2008-04-20 07:28:48 +00:00
spacy51 d2a372683d FIXED mistake 2008-03-03 14:41:14 +00:00
spacy51 2d36cde81d Qt:
ADDED shared, agb_core and gb_apu files to project file
2008-03-02 16:11:25 +00:00
mudlord 512c68d091 Removed unzip.cpp/h
Updated SDL port to use full FEX library as optional
2007-12-15 23:29:10 +00:00
mudlord e68e438141 Reverted DJRobX's changes with regards to stdint.h
BTW: Nach has placed a copy of the header here:
https://zsnes.bountysource.com/svn/!dirinfo/5168/trunk/src/win/vc_head
2007-11-15 11:54:51 +00:00
DJRobX d8ae34632f Fix up MSVC specific compile problems 2007-11-15 08:57:30 +00:00
Nach 552aadb95c More portability using C99 types. 2007-11-15 01:29:11 +00:00
Nach f33aafcbdf Trimmed whitespace, and set propper line endings for SVN. 2007-11-14 12:28:27 +00:00
DJRobX 7d96299124 Upgrade to 1.8 beta core 2007-11-07 01:27:54 +00:00
mudlord 8bda069b3b Added VBALink to the SVN code. Note that this is completely untested 2007-10-30 19:04:22 +00:00