Commit Graph

797 Commits (544c1cbb4bb6da97d30571ff28772660c7ad5969)

Author SHA1 Message Date
Lukas Werling 97f06fd0cd Fix openclonk-server build 2016-02-12 22:40:55 +01:00
Lukas Werling 24ef8b43af Grab the mouse while in-game (#1637)
This only implements this for the SDL port for now.
2016-02-12 21:09:40 +01:00
Lukas Werling f505b31032 SDL: Fix mouse button handling
- The right mouse button didn't work at all.

 - The left mouse button stopped working when clicking multiple times
   without moving the cursor.
2016-02-11 22:29:10 +01:00
Lukas Werling 392b7bab72 SDL: Add support for the mouse wheel
Fixes #0001682
2016-02-11 22:17:42 +01:00
Nicolas Hake 142b7ea7c3 RegCreateKeyEx: Pass NULL as lpClass
The lpClass parameter isn't used, and it is valid to pass NULL for it.
It is, however, not valid to pass a string literal, because the
conversion to nonconst char* has been deprecated in C++ for a long time
and doesn't exist anymore in C++11.
2016-02-08 17:36:50 +01:00
Günther Brammer b129e5f210 gtk: Remove unused variable 2016-02-06 23:48:13 +01:00
Günther Brammer 4b4b8781a0 Make GTK+ and SDL2 work together
If the gamepad code initialized the SDL video subsystem, GTK+ crashed in
libX11. Or something along those lines.

Making the optional subsystems using SDL for gamepads and audio use
SDL_InitSubSystem and only the SDL Application port do the full SDL_Init
is the proper way to do things in any case.
2016-02-06 21:12:56 +01:00
Günther Brammer 32d8d0db76 Finish the update from SDL_Mixer to SDL2_Mixer 2016-02-06 17:28:15 +01:00
Günther Brammer 934b519bb4 Update the SDL port to SDL2
SDL2 is a much closer match to the other platform code, and
allows the creation of OpenGL 3 core contexts, which is
now required.
2016-02-06 16:48:21 +01:00
Günther Brammer 1010732ba8 Fix the SDL build 2016-02-06 16:47:56 +01:00
Günther Brammer 59e5a327b2 gtk: Add support for microsoft windows 2016-02-06 16:47:44 +01:00
Günther Brammer 70d25b0b91 gtk: Fold contents of C4AppGTKImpl.h into C4AppGTK.cpp
C4WindowGTK.cpp no longer needs anything from it.
2016-02-03 03:17:16 +01:00
Günther Brammer cc4da38f74 gtk: Remove unused C4X11AppImpl::gammasize 2016-02-03 03:08:53 +01:00
Günther Brammer d0fb24adda Merge epoxy preparation branch
Various changes to make the commit switching to epoxy smaller.
2016-02-02 03:35:13 +01:00
Nicolas Hake e9cf0f6fdc Stop pretending we support 16 bit color
The GTK and OS X platforms already ignored the requested bit depth and
always used 32 bit. Windows and SDL would set a 16 bit color depth for
the screen, but still did all of the rendering short of the final
present in 32 bit.
2016-02-02 00:00:23 +01:00
Nicolas Hake 98c966c7d1 Win32: Don't take/restore copies of all textures on app (de)activation
Even though we (might) change the resolution, that doesn't result in
loss of textures because we don't recreate the OpenGL context. Therefore
we also don't have to restore their data. I believe this code is a relic
from the DirectX renderer, which would lose textures when switching away
from a fullscreen window.
2016-02-01 20:48:17 +01:00
Günther Brammer 83cf09db1a GL: Replace CStdGLCtx::Reinitialize with parameter to Clear() 2016-01-29 16:52:36 +01:00
Sven Eberhardt d9b8de9ea2 Win32: Fix file deletion from scenario selection dialogue 2016-01-24 00:43:09 -05:00
Günther Brammer 7167459f67 win32: Move PIXELFORMATDESCRIPTOR from C4AbstractApp to CStdGLCtx
That is the only user.
2016-01-23 22:02:52 +01:00
Günther Brammer 37fd0a88c6 win32: Rename C4Window::hRenderWindow to renderwnd to match GTK+ 2016-01-23 22:02:52 +01:00
Günther Brammer 9210c65e85 gtk: Hide usages of X11 behind #ifdef GDK_WINDOWING_X11 2016-01-23 22:02:51 +01:00
Günther Brammer aa931ac623 Drop some dead code in C4App.h and C4WindowGTK.cpp 2016-01-23 20:36:34 +01:00
Günther Brammer 1c15b8f661 gtk: Move OpenURL to the other implementations in PlatfromAbstraction 2016-01-23 20:36:34 +01:00
Günther Brammer 8f48f0275d gtk: Remove unnecessary C4Window::wnd
It was only used to specify a screen for randr, which doesn't need a
particular window.
2016-01-23 20:36:34 +01:00
Günther Brammer 93f12150c4 CMake: Remove obsolete USE_X11 option and add USE_WIN32_WINDOWS
USE_WIN32_WINDOWS was previously defined in PlatformAbstraction.h. Move it
to CMakeLists.txt and config.h like its peers. Replace USE_X11 with USE_GTK
or GDK_WINDOWING_X11 as appropriate.
2016-01-23 20:36:34 +01:00
Günther Brammer bc3754b871 Merge branch 'editor' 2016-01-16 16:00:57 +01:00
Armin Burgmeier ef63aa0975 mac: send keydown events for modifier flags change (#1574)
For example, keydown events when pressing/releasing the shift, alt, or control
keys. With this version this is needed ingame e.g. to pick up objects with
Shift.
2016-01-10 18:11:29 -08:00
Günther Brammer 39c2a0e18c gtk: Use glib-compile-resources instead of gdk-pixbuf-csource
Yet another deprecated feature replacement. At least this one makes our
code more concise.
2016-01-11 01:52:49 +01:00
Günther Brammer ab7f4f0bbf gtk editor: Use GTK+ 3 layout widgets
Specifically, GtkGrid. For most cases, this is an increase in lines of
code, but the landscape tools dialog can now be done with just three layout
widgets.

While at it, use a toolbar and move the mode buttons into it, too.
2016-01-10 00:19:07 +01:00
Armin Burgmeier eb83fc96d0 linux: fix scrollwheel in fullscreen (#1535)
Both "normal" and "smooth" scroll events were handled, and undoing the
effects of one another.
2016-01-08 20:55:07 -08:00
Sven Eberhardt 53a6ec3139 Fix thread handle type for Win32 threads. 2016-01-09 00:19:40 -04:00
Nicolas Hake 9b34bf2634 Remove arbitrary inline forward declarations of StdBuf (and derivatives) 2015-12-29 21:42:46 +01:00
Günther Brammer 77a71c39d3 Require some C++14 support (make_unique, index_sequence) 2015-12-29 15:47:55 +01:00
Günther Brammer 6a53066c36 Include config.h only from PlatformAbstraction.h
In order to avoid duplication, PlatformAbstraction.h has to be included at
the start of every source file, so that various headers can rely on it
being there. To avoid confusion, always rely on that, instead of sometimes
randomly including it or parts of it again.
2015-12-28 18:50:31 +01:00
Günther Brammer 30e0cdb418 CMake: Re-enable readline support for openclonk-server 2015-12-28 18:48:45 +01:00
Nicolas Hake d737dc1b05 Remove C4Video, StdVideo
Video recording and playback only worked on Windows, and recording only
handled video, not game audio. As such, it was of fairly limited use,
and there's lots of software available these days that handle both.
2015-12-28 11:43:41 +01:00
Nicolas Hake f7ed26eb9e Make OpenAL extension init log entry slightly less useless
It's still pretty useless because nobody cares in the slightest about
which extensions are available and which ones aren't, but at least now
it doesn't throw an unintelligible list of numbers at you.
2015-12-27 01:54:44 +01:00
Armin Burgmeier d7a5ac373d Fix the console build on Mac
cmake still does not create a nice bundle for it, but at least
the build does not fail anymore.
2015-12-23 16:31:19 -08:00
Nicolas Hake da51a2d8af CMake: Have headless build as a project instead of a separate config
Hardly anyone ever tests the headless build, because it requires you to
run CMake a second time with -DUSE_CONSOLE=On. So now it's an included
project which you'll get whether you want it or not.

I'm well aware that this could be solved more nicely, and that we could
be splitting unchanged files out into a separate support library, but
that's left for a later date.
2015-12-16 00:50:09 +01:00
Sven Eberhardt 171080cbd5 Play frontend music by tag. 2015-12-12 12:08:45 -05:00
David Dormagen 35fe8f8683 sound system: warn about missing sounds (in debug mode only) 2015-12-10 19:35:55 +01:00
Sven Eberhardt 1cf188bb45 Fix music system running into infinite pause after playlist changes #1460 #1485
A playlist change would reset SCounter and eventually cause all songs to be non-eligable.

Since playlists can now select differently sized subsets, the old way of selecting random songs without too much repetition no longer works. Rewrite to use a more robust algorithm.
2015-12-10 00:31:20 -05:00
Sven Eberhardt afac3a4572 Fix music system debug message unit for pause length. 2015-12-08 23:42:08 -05:00
Sven Eberhardt ad2de2e012 Do not interpret all .ocg files in definitions and scenarios as sound subgroups. 2015-12-07 00:11:29 -05:00
Sven Eberhardt 96082569bd Allow sounds in subfolders and create namespaces for them (#1185) 2015-12-06 23:44:41 -05:00
Sven Eberhardt 8b2dd0a8bb Win32: Fix "beep" on handled hotkeys (Alt+[key]) in fullscreen mode #1488 2015-12-06 22:32:47 -05:00
Sven Eberhardt d758c85028 Add max memory time to music resume feature (#1461) 2015-12-03 19:17:41 -05:00
Sven Eberhardt cbb7b0ba2c Log music system info if Config.Sound.Verbose is enabled. 2015-12-02 23:08:50 -05:00
Nicolas Hake eb22e357b1 Win32: Prevent Alt key presses from opening the system menu (#1468)
Pressing the Alt key enters the menu modal loop, which takes control of
the thread that everything happens on. As a quick fix, we'll suppress
this loop for simple Alt key presses, but this will still happen when
the system menu gets opened by Alt+Space or clicking the icon in the
window's title bar.

A more permanent solution would be to detach the message loop from
everything else, by having rendering etc. run in a separate background
thread.
2015-11-30 21:33:36 +01:00
Nicolas Hake 24b54211c5 Drop Min, Max, Swap for std::min, std::max, std::swap
The C++ standard library comes with perfectly fine implementations of
these functions, so there's no point in reimplementing them just for the
hell of it.
2015-11-15 13:53:01 +01:00