Commit Graph

10 Commits

Author SHA1 Message Date
glx 64f7b3a059 (svn r9358) [0.5] -Backport from trunk (r9055, r9082, r9083, r9084, r9085, r9086):
- Codechange: Change windows unicode handling and allow a pure non-unicode build to function. (r9055)
- Codechange: [win32] Update VS2003 and VS2005 project files to build in UNICODE mode. When making a release it is probably better to make two binaries, one without UNICODE, the other with, guaranteeing full Win9x compatibility (UNICODE with MSLU also works, without it's even better). (r9082)
- Codechange: Be more lenient when trimming UTF-8 strings and don't terminate the string when an invalid encoding is encountered, but only focus on maximum length. (r9083)
- Fix: [win9x] Clipboard paste for Windows95 (doesn't have CF_UNICODETEXT) correctly converts the input to the current locale. (r9084)
- Fix: [win32] Move the initialisation of _codepage (non-UNICODE) to winMain as a dedicated server, or different video driver will not have a win32 messageloop. (r9085)
- Fix: [win32] Rewrite keyboard input and handle all keypresses in a WM_CHAR event. This saves us from doing translation (ToUnicode[Ex], ToAscii[Ex]), and we get free IME-input support as a plus. (r9086)
2007-03-20 00:02:18 +00:00
Darkvater aea6916e3a (svn r7468) -Codechange: [win32] Add some comments to MB/WIDE_TO_WIDE/MB_[BUFFER] macros and
use them some more in win32 code. Also for the clipboard use the convert_from_fs
 function instead of calling Win32 API directly. Make the static buffers in OTTD2FS
 and FS2OTTD the same size (character-length wise)
2006-12-10 11:46:43 +00:00
Darkvater 74106ce6e9 (svn r7460) -Fix (r7337): [win32] If the underlying OS didn't have support for SHGetFolderPath the
application failed to run. Now test if the function exists and if not try a different
 approach using our own OTTDSHGetFolderPath wrapper.
2006-12-09 23:55:56 +00:00
Darkvater 1dd14cb932 (svn r7337) -Feature: [win32] Add font selection by specifying a font-name, ala Fontconfig. Pretty
messy if you ask me, but this is what you get when MS hides the font API in the deepest
 depths... thanks Rubidium for testing.
2006-12-03 19:03:38 +00:00
Darkvater b789cacb40 (svn r7333) -Codechange: [win32] Extend the OTTD2FS and FS2OTTD functions to also accept conversions
into a predefined buffer insted of using the static (global) buffer. This is useful if
 the converted value will be used later on; no need to copy it somewhere else to save it.
-CodeChange: [win32] Added appropiate macros WIDE_TO_MB_BUFFER, MB_TO_WIDE_BUFFER next to
 existing WIDE_TO_MB and MB_TO_WIDE that only do work when UNICODE is defined, saves
 #ifdefs all over the place
2006-12-03 17:47:53 +00:00
Darkvater d8d210056d (svn r7278) -Codechange: [win32] Add UNICODE support so it should compile on OS's using UNICODE
API exclusively.
2006-11-28 19:58:13 +00:00
Darkvater 8e6a911700 (svn r2962) - const correctness for all Get* functions and most Draw* functions that don't change their pointer parameters
- change a lot of byte player types to PlayerID
- beautify header files, same "#endif /* filename */" ending
2005-09-18 20:56:44 +00:00
tron 286f8726d5 (svn r2725) Move MyShowCursor() back into win32.c, it fits better there 2005-07-27 19:22:38 +00:00
tron a227065ab7 (svn r2701) Insert Id tags into all source files 2005-07-24 14:12:37 +00:00
tron 475d7fc0ae (svn r2697) Make compiling with SDL on Windows work again (missing #includes) and fix some warnings 2005-07-24 06:09:54 +00:00