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.
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.
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.
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.
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.