Commit Graph

147 Commits (2f8e63e9548f8624d5dd333759bac82f66343010)

Author SHA1 Message Date
Michael Lutz 965ce12947 Codechange: [OSX] Use newer mouse tracking API. 3 years ago
Michael Lutz 42af13c141 Codechange: [OSX] Split drawing into its own subview.
This allows the drawing backend code to be independent
of any event or command handling.
3 years ago
Michael Lutz 8aaf4ea098 Codechange: [OSX] Split Window and back buffer creation in Cocoa video driver. 3 years ago
Michael Lutz 0eff7de659 Cleanup: [OSX] Doxygen comment style in video driver. 3 years ago
Michael Lutz 8ced72ab10 Codechange: [OSX] Inline some functions that are used in only one place. 3 years ago
Michael Lutz 13134f9d64 Codechange: [OSX] Replace #define with modern code. 3 years ago
Michael Lutz 88f6c7a9f3 Codechange: [OSX] Fold remaining Cocoa video subdriver into the main driver. 3 years ago
Michael Lutz e6bea3961f Change: [OSX] Replace screen resolution list with suggested window sizes.
We never change the real screen resolution on OSX. As such, offering a list
of resolutions is pointless. Instead of that, offer the user a list of
commonly used window sizes up to the current screen size.
3 years ago
Michael Lutz 4db7837d06 Codechange: [OSX] There is only one subdriver left, remove virtual dispatch. 3 years ago
Michael Lutz fa60c1f8b9
Feature: Choose a sensible window size on a fresh OTTD config file. (#8536) 3 years ago
Michael Lutz 979b4af6ca Revert 4ce53cb8: [OSX] Delayed fullscreen switch is not needed anymore.
The fix for #8067 solves the real issue, making this workaround unneeded.
3 years ago
Michael Lutz 6e8be3b03e Fix #8067: [OSX] Calculate title bar height instead of assuming a fixed value. 3 years ago
Michael Lutz 4ce53cb851 Fix: [OSX] Quitting in fullscreen mode would loose the original window size.
This replicates the behaviour on e.g. Windows, which saves the original window size.
3 years ago
Michael Lutz c860a247d3 Change: [OSX] Hide Dock and menu during fullscreen mode. 3 years ago
Michael Lutz 6ad5489d01 Codechange: [OSX] Silence some annoying warnings. 3 years ago
Michael Lutz 7bdaabf5f1 Cleanup: [OSX] Remove cargo cult back-buffer alpha setting on show/hide and instead simply initialise the buffer on allocation. 3 years ago
Michael Lutz a61a741683 Change: [OSX] Compiling the Cocoa/Quartz video driver cannot be disabled anymore. 3 years ago
Michael Lutz 9ccef816f9 Codechange: [OSX] Re-arrange the OSX video driver code by combining all drawing code and moving the window/event handling to a different file.
This is just a code move/rename, not a functionality change.
3 years ago
Michael Lutz f3326d34e7 Codechange: Use std::string in FIO search path handling. 3 years ago
Michael Lutz 0c6e8a8123 Codechange: Store file search paths as std::string. 3 years ago
Michael Lutz 37bc2f8064 Codechange: Use std::string in the driver and blitter selection code. 4 years ago
Michael Lutz 9dd8b3d430 Remove: [OSX] Stuff that is pre-10.7 from the Cocoa/Quartz video driver. 4 years ago
Michael Lutz 0e5be3887c Remove: [OSX] Old fullscreen subdriver for pre 10.7 systems.
Since the move to C++11, building for pre 10.7 is not possible with the native
Apple tools. Also, due to bitrot, the file doesn't even compile anymore. While
this could be fixed, it shows that this subdriver is basically never used anymore.
4 years ago
Michael Lutz a31cbbf67f Remove: [OSX] QuickDraw video subdriver used for OSX versions up to 10.4.
Since the C++11 move, getting OpenTTD to compile and run for anything
below 10.7 basically requires building a custom compiler and libc++.
Also, the QuickDraw subdriver crashes on more modern OSX version. While this
is fixable, keeping the driver around is probably pointless.
4 years ago
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 5 years ago
Michael Lutz d5a9bd404a Codechange: [OSX] Use std::unique_ptr with a custom deleter to simply memory management of Core Foundation types. 5 years ago
Michael Lutz ed6a427fcc Change: [OSX] Recreate backing store if the colour profile of the screen (or the screen) the game window is one changes.
This will result in changing colours if moving OpenTTD from one screen to another, but should avoid performance problems if the window is moved.
5 years ago
glx 9195f2337a Codechange: use std::vector for _resolutions 5 years ago
Alexander Weiss 3e910a5969 Change: [OSX] Disable macOS Sierra's automatic tab feature 6 years ago
Michael Lutz e0ae67cefa Fix: [OSX] Compiler warning about an unused NULL argument. 6 years ago
Michael Lutz 6c3902ac41 Codechange: [OSX] Use newer APIs to get resolution information when available. 6 years ago
Michael Lutz 964d310cda Codechange: [OSX] Use non-deprecated API for displaying an alert where supported. 6 years ago
Michael Lutz 74b7f0a9aa Fix: [OSX] Remove some OSX compiler warnings on newer SDKs/compilers. 6 years ago
michi_cc 5a2fd3630b (svn r26818) -Fix [FS#AndyShouldHaveFoundFlySprayByNow] (r26758): [OSX] Line history and scrolling in the console window went on a walk. 10 years ago
michi_cc 2b3b8c93e7 (svn r26758) -Fix [FS#5972]: [OSX] Implement more of the text editing API to prevent crashes and improve IME support. 10 years ago
rubidium b476086c39 (svn r26538) -Codechange: remove double accounting of the drivers 10 years ago
rubidium 9ed12b0f07 (svn r26509) -Codechange: replace strdup with stredup (the latter ensures the return is not NULL) 10 years ago
rubidium 781dd48949 (svn r26502) -Fix: OSX compilation error 10 years ago
rubidium 2618d960e3 (svn r26209) -Codechange: remove some template magic and simplify some code 11 years ago
michi_cc 2708aff853 (svn r26023) -Fix [FS#5805] (r25686): [OSX] Checking for a valid NSTextInputContext is supposed to fail on 10.4 according to docs, but somehow didn't, leading to a crash when an edit box lost focus. 11 years ago
michi_cc 8ceef6ec61 (svn r26001) -Fix [FS#5795a] (r25686): [OSX] Clear any pending marked characters from an edit box losing focus. 11 years ago
michi_cc 9b68e4f864 (svn r25962) -Fix (r25951): [OSX] Do the SDK version test the proper way 'round. 11 years ago
michi_cc a41b8c851d (svn r25951) -Fix [FS#5797]: [OSX] Disable the old fullscreen sub-driver when compiling with SDK versions 10.9+. 11 years ago
michi_cc a298a62098 (svn r25950) -Codechange: [OSX] Move some functions used by all video sub-drivers into the common source file. 11 years ago
michi_cc f36396929a (svn r25751) -Fix (r25657): [OSX] Restore fullscreen state also when starting on 10.7+. 11 years ago
fonsinchen 0baa72aff9 (svn r25714) -Fix: explicitly cast some things to silence warnings on GCC 4.0 11 years ago
fonsinchen a9fde2856c (svn r25710) -Fix: string arguments to NSNotificationCenter::addObserver and NSNotificationCenter::postNotificationName can't be const in certain versions of OSX 11 years ago
michi_cc b3ecfbb67a (svn r25693) -Add: [OSX] Support the new IME functions introduced with 10.5. 11 years ago
michi_cc 30867c487f (svn r25691) -Add: [OSX] Support for mouse selection in the IME composition string. 11 years ago
michi_cc e2ec0ddb03 (svn r25690) -Change: [OSX] Position the candidate window at the caret position. 11 years ago
michi_cc f5e4131492 (svn r25689) -Add: [OSX] Display the IME composition string ourself. 11 years ago
michi_cc c64e297e0c (svn r25688) -Codechange: [OSX] Make our view aware of text input by IMEs. 11 years ago
michi_cc 643a294e68 (svn r25687) -Codechange: [OSX] Pass text input directly down to the text handling. 11 years ago
michi_cc e4d48f3a3b (svn r25686) -Codechange: [OSX] Abandon IME input if the edit box lost the focus. 11 years ago
michi_cc 8003da77aa (svn r25665) -Fix [FS#4689]: [OSX] Crash when unhiding the main window. 11 years ago
michi_cc 1ae357e905 (svn r25664) -Add [FS#4847]: [OSX] Bootstrap downloading of a baseset. (Matthieu) 11 years ago
michi_cc 4ec314989d (svn r25660) -Fix: [OSX] The name's OpenTTD, not OTTD. 11 years ago
michi_cc 6d50b10074 (svn r25655) -Fix: [OSX] Mouse cursor wasn't displayed properly after switching to fullscreen on 10.7+. (Based on patch by Maedhros) 11 years ago
rubidium d5d96ba683 (svn r24877) -Fix: some whitespace "errors" 12 years ago
yexo 1f75f81a41 (svn r24524) -Fix [FS#5296]: fix some compile problems in mac-only code (__ln__) 12 years ago
michi_cc 6dbb050a32 (svn r22999) -Codechange: Allow changing the blitter during the running game. 13 years ago
planetmaker 6a72d64dbe (svn r22943) -Fix: [OSX] Typo broke debug compilation 13 years ago
planetmaker 58f00d786c (svn r22921) -Fix: [OSX] Don't allow the old fullscreen mode also not as fallback on OSX 10.7. Also add a few sprinkles of coding style accross cocoa display drivers 13 years ago
planetmaker bce482c76f (svn r22893) -Fix [FS#4744]: [OSX] Compilation on OSX 10.7 was broken (based on patch by leecbaker)
-Add: [OSX] Support for fullscreen mode when compiled against SDK 10.7. Otherwise fullscreen mode is disabled when OpenTTD is run on OSX Lion
13 years ago
planetmaker e3d9879690 (svn r22678) -Doc: More doxygen sprinkles in MacOSX code and cocoa video driver 13 years ago
rubidium 1d0d7635e0 (svn r22021) -Fix (r22019): ofcourse make doesn't notice files are gone, so it doesn't recompile everything that needs to be recompiled... 14 years ago
planetmaker 9ddcbaf9b7 (svn r21684) -Fix [FS#4360] (r21573): Silence some compile warnings 14 years ago
planetmaker adc1760b0d (svn r21578) -Fix [FS#2585]: [OSX] A double mouse cursor was shown under certain circumstances (based on patch by matheweis) 14 years ago
planetmaker 30eef98ec0 (svn r21577) -Codechange: [OSX] Deduplicate code by moving the handling of the window class for screen drivers to a common class 14 years ago
planetmaker e38f96d609 (svn r21576) -Codechange: [OSX] Deduplicate code by moving the handling of the view for windowed screen drivers to a common class 14 years ago
planetmaker 26575ab8f8 (svn r21575) -Codechange: [OSX] Use the same class for the window delegate routines in windowed screen drivers 14 years ago
planetmaker 832625bb0e (svn r21522) -Fix: [OSX] Silence a warning when compiling without quartz and quickdraw 14 years ago
rubidium b8487afe54 (svn r20192) -Cleanup: bye bye variables.h, bye bye VARDEF... you won't be missed :) 14 years ago
peter1138 abb147d974 (svn r18709) -Fix (r10227,FS#3464): Animation buffer for 32bpp-anim blitter was only validated during sprite blitting, other drawing operations didn't check it. Initial startup and window resize could therefore lead to crash. 15 years ago
frosch 29d6491605 (svn r18545) -Fix [FS#3292]: Assign '_screen.dst_ptr' as soon as it is allocated. 15 years ago
michi_cc 6ad7440ae5 (svn r17716) -Codechange: [OSX] Invoke a (semi-)private Objective-C method in a way that does not rely on the SDK version. 15 years ago
michi_cc 9b54d5bbd7 (svn r17713) -Cleanup: [OSX] Move variable definitions to first use and apply more coding style. 15 years ago
michi_cc ec90a8778f (svn r17712) -Codechange [FS#1411]: [OSX] Replace undocumented process manager API calls with a documented alternative. (pyth) 15 years ago
michi_cc 8484e08ee0 (svn r17711) -Codechange: [OSX] Don't use deprecated methods to construct a Cocoa string. 15 years ago
michi_cc a831143f45 (svn r17707) -Fix: [OSX] Show the OS mouse cursor when displaying a dialog box if it was hidden. 15 years ago
michi_cc 5f67762a7f (svn r17706) -Codechange: [OSX] Rework the crash handling to use the common CrashLog infrastructure. 15 years ago
smatz 6c7f8fc8b4 (svn r17701) -Codechange: don't start line with a space if it's not inside comment 15 years ago
rubidium 7fbc33dae1 (svn r17248) -Fix: add GPL license notice where appropriate 15 years ago
rubidium e3c7a77b40 (svn r16827) -Codechange: make OSX specific files include stdafx.h always as the first file. Also unify OSX specific stuff into osx_stdafx.h and remove unused includes. 15 years ago
rubidium 11da45ee55 (svn r14949) -Cleanup: pointer coding style 16 years ago
rubidium 6b86de13d6 (svn r14200) -Fix (r14199): some OSes failed to compile. Furthermore I hate wrong comments! 16 years ago
smatz 2299181c4b (svn r13537) -Fix [FS#2090](r13523): QSortT won't work this way, use Dimension instead of uint16[2] for resolutions 16 years ago
bjarni 8fea5a62c9 (svn r12985) -Fix (r12977): [OSX] fixed missing includes in the cocoa files 16 years ago
belugas 3dd61f423a (svn r11734) -Change: Allow ToggleFullScreen to return the result of the operation' attempt. Previously, only visual clues were available.
-Fix[FS#1519]: When you can not use this resolution at full screen, now you'll know that it failed.
As for the reason it did not work, each computer/OS has its reason.
17 years ago
egladil 22f79df328 (svn r11688) -Fix [FS#1581]: Compilation was broken on OS X again. 17 years ago
egladil 2885c66060 (svn r11653) -Feature: [OSX] Allow windowed mode subdrivers to be disabled at compile time. 17 years ago
bjarni 2256d9d378 (svn r11599) -Change: [OSX] 10.4 will now use quickdraw for window mode instead of quartz
The reason is that quickdraw is way faster (try fast forward)
  10.5 will still use quartz as it can't handle quickdraw.
17 years ago
bjarni 5fcbb8f59b (svn r11540) -Fix: [OSX] Don't try to compile the quartz video driver on OSX 10.3. It will fail 17 years ago
egladil 1d5010edf9 (svn r11521) -Codechange: [OSX] Check what the running os version is in a cleaner way. 17 years ago
egladil fcbfba1e17 (svn r11508) -Cleanup: Removed unused headers from the cocoa video driver. 17 years ago
egladil 2ebf50e421 (svn r11498) -Add [FS#1411]: [OSX] Added support for using Quartz instead of Quickdraw in windowed mode on OS X 10.4 and higher. Based on a patch by blackis. 17 years ago
egladil 3ad488e98f (svn r11492) -Codechange: [OSX] Split the cocoa video driver into several files. The reason for this is that the fullscreen and windowed mode api are separate from each other in OS X and thus the driver actual is two drivers in one. This split is to make the code more readable and to prepare for replacing the Quickdraw windowed mode code which uses apis deprecated as of OS X 10.5 (and maybe earlier). 17 years ago