IntelOrca
cdee534eb1
use SDL2's platform defines to normalise platform guards
2016-01-14 20:12:43 +00:00
Marijn van der Werf
0825b9bf62
Share currency detection across platforms
2016-01-13 21:38:10 +01:00
Marijn van der Werf
452acd7627
Set minimal window size
2016-01-13 19:55:35 +01:00
Ruben De Smet
e9ed444387
Implement singleton locking for POSIX.
2016-01-11 14:33:19 +01:00
Ruben De Smet
afc89195aa
Remove stub from posix.c:platform_get_drives
2016-01-11 14:33:19 +01:00
Ruben De Smet
cd72f282dc
POSIX: implement move file method
2016-01-11 14:33:19 +01:00
Ruben De Smet
e035c7984a
Fix concerns in platform_directory_delete.\n\n Not sure about fts_close when passing NULL yet. Leaving this commit as a marker
2016-01-11 14:33:19 +01:00
Ruben De Smet
012ff3adbc
Add platform_directory_delete implementation for posix.
2016-01-11 14:33:19 +01:00
Ruben De Smet
b0a531b523
Implement file copy on POSIX systems.
...
Autosave should work now on Mac OS X and Linux.
Fix tabs randomly inserted by vim
Concerns in file copy
2016-01-11 14:33:15 +01:00
Ted John
1b62f22bde
Merge pull request #2690 from janisozaur/debian
...
Support for debian packaging.
2016-01-10 23:46:37 +00:00
Ruben De Smet
c675993d3f
Fix a bug where some paths get truncated on posix.
...
Especially when editing the title screen on.
2016-01-10 23:55:56 +01:00
IntelOrca
c7feb72a69
move compiler normalisation to rct2.h
2016-01-10 22:50:35 +00:00
IntelOrca
e79edcb1d6
fix posix.c headers
2016-01-10 22:50:32 +00:00
IntelOrca
e9d222fdd3
new-argparse: finish new argparse integration and clean up
2016-01-10 22:50:31 +00:00
IntelOrca
9d98147b75
new-argparse: implement argument and option parsing
2016-01-10 22:50:29 +00:00
IntelOrca
5796cf3053
use native line endings for config.ini and themes, closes #2678
2016-01-09 22:43:12 +00:00
IntelOrca
3073bc64fd
remove rct2_endupdate
2016-01-09 00:25:30 +00:00
IntelOrca
3b4928c041
fix windows file enumerate pattern matching
2016-01-04 18:29:18 +00:00
Ted John
015c76084e
Merge pull request #2616 from atmaxinger/autosave-timestamp
...
Append timestamp to autosave
2016-01-04 17:54:11 +00:00
Maximilian Irlinger
a0bb568889
Append timestamp to autosave
2016-01-04 16:22:15 +01:00
Michał Janiszewski
b45ca38d52
UTC epoch time for POSIX
2016-01-03 21:41:21 +01:00
IntelOrca
99e0d999b2
add timestamp to highscores.dat
2016-01-03 01:48:52 +00:00
Michał Janiszewski
8a5d066efe
Fix strict aliasing violations
...
Compiler only guarantees proper accesses to variables when using
variable's native type or `char` (i.e. single byte type) [1].
This commit fixes violations of this rule. In most cases changing code
to a simple cast was enough, some required a bit deeper modifications.
This fixes #2596 .
[1] http://blog.qt.io/blog/2011/06/10/type-punning-and-strict-aliasing/
2015-12-31 13:27:26 +01:00
Michał Janiszewski
36de7a9027
Fix warnings
...
Some off-by-one errors, truncation warning fix, main() in posix.c no
longer a stub.
2015-12-29 16:09:36 +01:00
Michał Janiszewski
6a5fc90cd4
Fix CMakeLists for MinGW cross-compilation
...
This makes sure that shared library built with MinGW toolchain is linked
statically to *all* its dependencies, including libc, libstdc++, libsdl2
and all the others. This allows producing of working `openrct2.dll` by
cross-compiling.
I hit a bug with libcrypto, a dependency of libssl, which in turn is a
dependency of curl, which creates a `DllMain` entrypoint for static lib
too, but since we don't do anything in ours, this should be safe.
I have only had chance to try it out when cross-compiling, ideally it
should be tested under Cygwin/MSYS too, but it is too bothersome to
setup for me.
2015-12-28 01:17:28 +01:00
Michał Janiszewski
184b375dcb
Fix XP compatibility after #2546
...
8bdec9f68 (#2546 ) introduced call to SHGetKnownFolderPath which is only
available on Vista and later operating systems, but eda733165 restored
previous hard-coded functionality for MinGW. Use the same for XP
support.
According to
https://tedwvc.wordpress.com/2014/01/01/how-to-target-xp-with-vc2012-or-vc2013-and-continue-to-use-the-windows-8-x-sdk/
it should work.
2015-12-27 20:34:04 +01:00
Tomáš Pazdiora
6ac38a6382
fixed bug in "Fix #2158 "
...
which caused (if fullscreen was set) starting game in desktop resolution instead of selected fullscreen resolution.
2015-12-26 23:48:05 +01:00
Michał Janiszewski
c0830ae02e
Fix memory leaks in font selection for Linux
...
Add some logging too, in particular warning when no font was found.
2015-12-25 20:32:54 +01:00
Aaron van Geffen
eda733165e
Added a hack for MINGW compatibility.
2015-12-26 01:00:34 +09:00
Aaron van Geffen
474af5c204
Use Cocoa APIs for font detection on OS X. Moving FontConfig to Linux platform only.
2015-12-25 02:52:33 +09:00
Aaron van Geffen
8bdec9f68e
Experimental: use SHGetKnownFolderPath to get font path on Windows.
2015-12-25 02:17:45 +09:00
Aaron van Geffen
dd604afc89
Use FontConfig to find suitable TrueType fonts on Linux and OS X. Fixes #2537 .
2015-12-25 01:53:52 +09:00
Michał Janiszewski
3ba9ec8c81
CMake updates for packaging on Linux
...
This enables install and package targets for make.
You can specify installation prefix with -DCMAKE_INSTALL_PREFIX=path,
when doing `make install`, OpenRCT shall be found there.
You can also use `make package` for creating packaged release files.
2015-12-22 22:47:44 +01:00
LRFLEW
46e773736c
Fixed trackpad-as-touchscreen on OS X
2015-12-20 21:12:14 -06:00
IntelOrca
eab3e15182
improve touch positioning
2015-12-21 00:39:38 +00:00
Sam Parkinson
2852c02e0a
Handle touch events
...
Natively on Linux, using OpenRCT2 with touch is impossible because
touch events are not handled by the game. They just don't do anything.
This commit handles touch events. A single touch represents a
press of the left mouse button. If it followed by another touch
within 300ms, a right mouse button event is emitted. This timeout
is like that of mobile web browsers [1].
[1] https://developers.google.com/web/updates/2013/12/300ms-tap-delay-gone-away?hl=en
2015-12-20 19:33:12 +11:00
LRFLEW
d91a82f6ea
Added searching for OpenRCT2 data in OS X app bundle resources folder
2015-12-19 00:07:01 +01:00
Michał Janiszewski
ea6fa2c82a
Let user specify the data dir as cmdline option.
...
This adds --openrct-data-dir=<str> option to command line letting user
select where he wants OpenRCT2-specific data to be. By default the
search locations are:
* <exePath>/data (on all platforms)
* /var/lib/openrct2 (on Linux)
* /usr/share/openrct2 (on Linux)
2015-12-19 00:06:41 +01:00
Ted John
859c35574a
Merge pull request #2510 from LinusU/trap-mouse
...
Trap mouse
2015-12-18 21:06:57 +00:00
Linus Unnebäck
e1938bb17a
trap-mouse: cleanup
2015-12-18 09:13:26 +01:00
Rune Laenen
1a4ebcc0f7
Add option to trap mouse cursor
2015-12-18 09:13:26 +01:00
LRFLEW
8b63080aeb
Some Objective-C Code Cleanup
2015-12-17 22:06:07 -06:00
Ted John
aed5117384
Merge pull request #2489 from LinusU/locale-clang-fix
...
osx: fix locale issues
2015-12-15 08:04:47 +00:00
Linus Unnebäck
7ea7625db5
osx: correct modifier key
2015-12-15 08:34:33 +01:00
Linus Unnebäck
5d03fc3fb6
osx: fix locale issues
2015-12-15 08:22:08 +01:00
Michał Janiszewski
98e204552a
countof with type safety
...
For reference see http://www.g-truc.net/post-0708.html and
http://lxr.free-electrons.com/source/include/linux/kernel.h#L54
This will provide a type-safe mechanism for counting elements of array.
If you try passing something which cannot be counted, compiler will
frown at you right away.
2015-12-15 00:28:58 +01:00
Ted John
df3bf363ca
Merge pull request #2338 from Smeat/linux_get_locale
...
[Linux] Implement platform_get_locale_language.
2015-12-14 14:48:21 +00:00
Ted John
4fb73e4acb
Merge pull request #2435 from samdroid-apps/ctrl-backspace-clear-inputs-try2
...
Implement CTRL-Backspace shortcut for clearing inputs, fixes #2355
2015-12-14 14:46:56 +00:00
Michał Janiszewski
3bf659a9ea
Include safe_strncpy declaration in linux.c
...
Fixes at least one of #2483
2015-12-13 23:09:59 +01:00
Kyle Kirbatski
2a8ed04eda
Add platform dialog functions for OS X
2015-12-12 17:22:14 -06:00