quakespasm/Quake
Sander van Dijk c21ea8687e in_sdl.c: Restructure the SDL1 backend a bit.
Tested on Linux and Windows with various keyboard layouts. This fixes some text input weirdness on Windows.

Before, we always used the "unicode" field (if available) of SDL's keydown events to overrule the "sym" field with which Key_Event() is called. However, the "unicode" field is only filled for keydown events, so this meant that our keyup events didn't always match their corresponding keydown events. With the introduction of Char_Event(), we can now use the "unicode" field for textinput only, and call Key_Event() with the non-overruled "sym" field. This has the benefit that keyup events now match keydown events, and that we can get rid of several ugly hacks (some platform specific ifdef's and some control character handling).

Note: the translation of the numpad keys to other keys when not in "gamekey" mode was dropped, because otherwise a numpad key could trigger (for intstance) both a textinput and a cursor movement in the console. This is arguably cleaner anyway.



git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1042 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-09-20 22:41:44 +00:00
..
anorm_dots.h initial import of SDL port of Fitzquake-0.85 / 20090510 sources. 2010-02-15 23:26:55 +00:00
anorms.h initial import of SDL port of Fitzquake-0.85 / 20090510 sources. 2010-02-15 23:26:55 +00:00
arch_def.h arch_def.h: update from uhexen2. 2014-07-11 07:06:15 +00:00
bgmusic.c replace all ctype.h functions/macros and strcasecmp/strncasecmp() 2013-09-25 17:01:40 +00:00
bgmusic.h some codec stuff syncing with uhexen2 2013-02-27 16:50:25 +00:00
bspfile.h BSP2 support. patch kindly provided by Eric Wasylishen (see the patch 2013-12-25 09:10:28 +00:00
build_cross_osx-sdl2.sh Makefile.darwin: target 10.5 when building for x86 against SDL2. 2014-09-17 11:00:28 +00:00
build_cross_osx.sh - Makefile.darwin: -mmacosx-version-min also needs to be among 2012-09-03 21:21:04 +00:00
build_cross_win32.sh - Makefile.darwin: -mmacosx-version-min also needs to be among 2012-09-03 21:21:04 +00:00
build_cross_win64.sh - Makefile.darwin: -mmacosx-version-min also needs to be among 2012-09-03 21:21:04 +00:00
cd_null.c Made CDAudio_Play() to return success (0) or failure (-1) instead of void. 2011-01-02 18:33:21 +00:00
cd_sdl.c SDL2 support, if USE_SDL2 defined. 2014-09-05 19:34:43 +00:00
cdaudio.h Made CDAudio_Play() to return success (0) or failure (-1) instead of void. 2011-01-02 18:33:21 +00:00
cfgfile.c cfgfile.c (CFG_ReadCvars): Also check for ferror(). Use FS_rewind() 2011-12-27 19:40:14 +00:00
cfgfile.h cfgfile.c (CFG_ReadCvars): Also check for ferror(). Use FS_rewind() 2011-12-27 19:40:14 +00:00
chase.c * first shot at cvar flag system and cvar layer clean-ups : 2011-12-28 22:01:33 +00:00
cl_demo.c Revert Pa3PyX support for cross-map demos 2014-08-25 02:55:16 +00:00
cl_input.c Some "slowkey" tuning. 2013-02-03 17:22:59 +00:00
cl_main.c some merges from uhexen2: clean up some crap in long chat line support. 2012-10-21 09:55:16 +00:00
cl_parse.c Apply Baker's fix for cross-map demo playback (http://forums.inside3d.com/viewtopic.php?f=3&t=2397). 2014-08-25 02:55:25 +00:00
cl_tent.c renamed model_t to qmodel_t in order to avoid conflicts on solaris. 2012-05-30 08:56:06 +00:00
client.h Revert Pa3PyX support for cross-map demos 2014-08-25 02:55:16 +00:00
cmd.c revert r903 and the old conback hack commits. change the engine 2014-04-27 08:28:16 +00:00
cmd.h const correctness changes. 2010-08-29 02:22:55 +00:00
common.c applied the user directories support patch, disabled by default. 'make DO_USERDIRS=1' to enable it. 2014-09-10 07:28:28 +00:00
common.h moved Host_Game_f to common.c, made it to use COM_AddGameDirectory(). moved in-memory pak structures, searchpatch structure and searchpath global declarations to common.h. adjusted affected extra patches. 2014-09-08 21:10:33 +00:00
console.c bumped version to 0.90.0 2014-09-16 09:05:36 +00:00
console.h some merges from uhexen2: clean up some crap in long chat line support. 2012-10-21 09:55:16 +00:00
crc.c initial import of SDL port of Fitzquake-0.85 / 20090510 sources. 2010-02-15 23:26:55 +00:00
crc.h bspfile.h, cdaudio.h, client.h, cmd.h, common.h, console.h, crc.h, cvar.h, 2010-02-21 00:01:08 +00:00
cvar.c Change Cvar_Cycle_f to use Q_atof to be consistent with other cvar code. Q_atof("0.3"), a float, does not == atof("0.3"), a double. 2014-08-18 17:12:39 +00:00
cvar.h more cvar cleanups: Added Cvar_LockVar, Cvar_UnlockVar, Cvar_UnlockAll and 2011-12-29 12:28:21 +00:00
d_ifacea.h bspfile.h, cdaudio.h, client.h, cmd.h, common.h, console.h, crc.h, cvar.h, 2010-02-21 00:01:08 +00:00
detect.sh Updated support for building the OSX versions using Makefile.darwin. Do 2012-08-16 04:51:41 +00:00
draw.h remove zombie USE_QS_CONBACK ifdefs 2014-07-29 16:22:29 +00:00
gl_draw.c Revert r731 ("Make the key menu scrollable"). 2014-09-20 15:57:33 +00:00
gl_fog.c ditch fmin/fmax and use plain q_min/q_max 2014-06-22 05:50:39 +00:00
gl_mesh.c renamed model_t to qmodel_t in order to avoid conflicts on solaris. 2012-05-30 08:56:06 +00:00
gl_model.c Fence texture support on brush models, e.g. for rmqdemo2 e1m6rq.bsp. Based on Baker's implementation in Fitz Mark V. Consistent with Fitz Mark V, RMQEngine, FTEQW rendering. 2014-08-19 02:20:12 +00:00
gl_model.h Load world and brush models into a VBO, and draw it in batches in R_DrawTextureChains_Multitexture. Uses the same immediate mode code as before if VBOs are not available, or if "-novbo" used at the command line. I only touched R_DrawTextureChains_Multitexture because it's usually the main bottleneck aside from alias model rendering. 2014-09-11 04:55:16 +00:00
gl_refrag.c renamed model_t to qmodel_t in order to avoid conflicts on solaris. 2012-05-30 08:56:06 +00:00
gl_rlight.c Fixed increased (more than 32) dynamic lights. 2012-07-10 11:21:17 +00:00
gl_rmain.c gl_rmain.c: make gl_zfix default to 0, no longer save it to config.cfg 2014-09-07 19:35:52 +00:00
gl_rmisc.c Load world and brush models into a VBO, and draw it in batches in R_DrawTextureChains_Multitexture. Uses the same immediate mode code as before if VBOs are not available, or if "-novbo" used at the command line. I only touched R_DrawTextureChains_Multitexture because it's usually the main bottleneck aside from alias model rendering. 2014-09-11 04:55:16 +00:00
gl_screen.c gl_screen.c: make the console speed independent of the current resolution. Before, switching to a really high (e.g. 2880x1800) resolution would make the colsole take several seconds to open/close 2014-09-08 06:25:59 +00:00
gl_sky.c dropped support for GL_SGIS_multitexture 2014-08-30 08:00:34 +00:00
gl_texmgr.c r_world: Add a new R_DrawTextureChains_Multitexture_VBO function. Draws lightmapped surfaces with fulbrights in one pass, using the VBO. Requires 3 TMUs, GL_COMBINE_EXT, and GL_ADD. 2014-09-20 01:08:13 +00:00
gl_texmgr.h r_world: Add a new R_DrawTextureChains_Multitexture_VBO function. Draws lightmapped surfaces with fulbrights in one pass, using the VBO. Requires 3 TMUs, GL_COMBINE_EXT, and GL_ADD. 2014-09-20 01:08:13 +00:00
gl_vidsdl.c r_world: Add a new R_DrawTextureChains_Multitexture_VBO function. Draws lightmapped surfaces with fulbrights in one pass, using the VBO. Requires 3 TMUs, GL_COMBINE_EXT, and GL_ADD. 2014-09-20 01:08:13 +00:00
gl_warp.c renamed model_t to qmodel_t in order to avoid conflicts on solaris. 2012-05-30 08:56:06 +00:00
gl_warp_sin.h initial import of SDL port of Fitzquake-0.85 / 20090510 sources. 2010-02-15 23:26:55 +00:00
glquake.h r_world: Add a new R_DrawTextureChains_Multitexture_VBO function. Draws lightmapped surfaces with fulbrights in one pass, using the VBO. Requires 3 TMUs, GL_COMBINE_EXT, and GL_ADD. 2014-09-20 01:08:13 +00:00
host.c bumped version to 0.90.0 2014-09-16 09:05:36 +00:00
host_cmd.c moved Host_Game_f to common.c, made it to use COM_AddGameDirectory(). moved in-memory pak structures, searchpatch structure and searchpath global declarations to common.h. adjusted affected extra patches. 2014-09-08 21:10:33 +00:00
image.c restore compilability with g++. some whitespace tidy-ups. 2014-09-02 05:40:41 +00:00
image.h constified the name arguments of Image_LoadImage() and Image_WriteTGA() 2011-12-12 12:56:57 +00:00
in_sdl.c in_sdl.c: Restructure the SDL1 backend a bit. 2014-09-20 22:41:44 +00:00
input.h added IN_UpdateForKeydest() as a new helper who does stuff if the 2012-10-21 11:33:10 +00:00
keys.c keys.c Key_Event(): add sanity check 2014-09-20 14:27:32 +00:00
keys.h input: Add a function Key_GameKey to separate the input driver layer a bit more. 2014-09-13 09:39:51 +00:00
main_sdl.c bumped version to 0.90.0 2014-09-16 09:05:36 +00:00
Makefile remove SDL_net support which had been unsupported for some time 2014-09-20 20:37:35 +00:00
Makefile.darwin remove SDL_net support which had been unsupported for some time 2014-09-20 20:37:35 +00:00
Makefile.w32 remove SDL_net support which had been unsupported for some time 2014-09-20 20:37:35 +00:00
Makefile.w64 remove SDL_net support which had been unsupported for some time 2014-09-20 20:37:35 +00:00
mathlib.c removed all remaining references to id386 and UNALIGNED_OK because 2011-01-01 12:24:28 +00:00
mathlib.h * mathlib.h (IS_NAN): Fixed strict aliasing violation by providing 2012-03-24 06:24:56 +00:00
menu.c Revert r731 ("Make the key menu scrollable"). 2014-09-20 15:57:33 +00:00
menu.h menu: Add Char_Event support for the textfields in the menu. 2014-09-13 16:13:16 +00:00
modelgen.h bspfile.h, cdaudio.h, client.h, cmd.h, common.h, console.h, crc.h, cvar.h, 2010-02-21 00:01:08 +00:00
net.h Re: r897: lowered NET_MAXMESSAGE and MAX_MSGLEN from 65536 to 64000. not happy with this limit bump at all, but let's see how it will turn out.. 2014-03-25 07:28:11 +00:00
net_bsd.c net_win.c, net_sdl.c, net_bsd.c, net_defs.h: removed fixed size from net_drivers 2011-12-18 10:00:36 +00:00
net_defs.h net_win.c, net_sdl.c, net_bsd.c, net_defs.h: removed fixed size from net_drivers 2011-12-18 10:00:36 +00:00
net_dgrm.c replace all ctype.h functions/macros and strcasecmp/strncasecmp() 2013-09-25 17:01:40 +00:00
net_dgrm.h const correctness changes. 2010-08-29 02:22:55 +00:00
net_loop.c const correctness changes. 2010-08-29 02:22:55 +00:00
net_loop.h net_loop.h: Tiny whitespace tidy up. 2011-12-18 09:51:28 +00:00
net_main.c replace all ctype.h functions/macros and strcasecmp/strncasecmp() 2013-09-25 17:01:40 +00:00
net_sys.h remove SDL_net support which had been unsupported for some time 2014-09-20 20:37:35 +00:00
net_udp.c net_udp.c: Fixed FIONREAD ioctl to take an int* argument instead of 2011-11-12 18:03:49 +00:00
net_udp.h const correctness changes. 2010-08-29 02:22:55 +00:00
net_win.c net_win.c, net_sdl.c, net_bsd.c, net_defs.h: removed fixed size from net_drivers 2011-12-18 10:00:36 +00:00
net_wins.c renamed Sys_FloatTime to Sys_DoubleTime (the thing always returned double 2011-12-12 16:01:01 +00:00
net_wins.h const correctness changes. 2010-08-29 02:22:55 +00:00
net_wipx.c * net_sys.h: revert previous commit undefining EWOULDBLOCK and 2011-01-12 20:10:34 +00:00
net_wipx.h const correctness changes. 2010-08-29 02:22:55 +00:00
pl_linux.c fix SDL2 compilation using g++ 2014-09-14 06:03:56 +00:00
pl_osx.m SDL2 support, if USE_SDL2 defined. 2014-09-05 19:34:43 +00:00
pl_win.c fix SDL2 compilation using g++ 2014-09-14 06:03:56 +00:00
platform.h added PL_GetClipboardData() 2012-09-27 12:58:37 +00:00
pr_cmds.c PF_VarString: raise buffer size to 1024. I checked all buffers that the resulting string could end up in, and they're all at least 1024 bytes (even with an unmodified quake client). 2014-09-01 07:30:23 +00:00
pr_comp.h pr_comp.h, pr_edict.c, progs.h, pr_cmds.c, pr_exec.c: made some of the 2011-12-12 08:56:25 +00:00
pr_edict.c pr_edict.c (PR_ValueString, PR_UglyValueString, PR_GlobalString, 2012-12-11 10:11:22 +00:00
pr_exec.c pr_cmds.c, pr_exec.c, pr_edict.c, sv_main.c: Changed several Sys_Error() 2012-11-15 17:30:43 +00:00
progdefs.h bspfile.h, cdaudio.h, client.h, cmd.h, common.h, console.h, crc.h, cvar.h, 2010-02-21 00:01:08 +00:00
progdefs.q1 initial import of SDL port of Fitzquake-0.85 / 20090510 sources. 2010-02-15 23:26:55 +00:00
progs.h Raise MAX_ENT_LEAFS from 16 to 32, fixes disappearing/flickering bmodels in some situations. In particular fixes an elevator in fort_driant-fullvis.bsp, and a grate (func_door) in jam1_ionous.bsp. 2014-08-13 06:40:07 +00:00
protocol.h * client.h: moved usercmd_t structure to protocol.h 2011-12-18 10:03:53 +00:00
q_ctype.h replace all ctype.h functions/macros and strcasecmp/strncasecmp() 2013-09-25 17:01:40 +00:00
q_sound.h bump MAX_EFRAGS to 4096 (from 2048) and MAX_CHANNELS to 1024 (from 512). For ijed's map - has over 500 ambient sounds, causing it to hit the channel limit, and a lot of static entities, which I guess cause it to exceed the old efrags limit. For future reference, according to mh, the efrags array can be removed entirely in glquake (http://forums.inside3d.com/viewtopic.php?t=1930) and each efrag allocated in the hunk memory. 2014-08-10 03:33:59 +00:00
q_stdinc.h move MAX_OSPATH definition to q_stdinc.h. define it as PATH_MAX, 2014-07-01 16:25:00 +00:00
qs_bmp.h Simplify the linux icon transparency setting. 2012-09-25 03:07:33 +00:00
quakedef.h bumped version to 0.90.0 2014-09-16 09:05:36 +00:00
quakespasm.pak quakespasm.pak: add several .ent files to prevent z-fighting 2014-09-07 19:33:38 +00:00
r_alias.c dropped support for GL_SGIS_multitexture 2014-08-30 08:00:34 +00:00
r_brush.c r_world: Add a new R_DrawTextureChains_Multitexture_VBO function. Draws lightmapped surfaces with fulbrights in one pass, using the VBO. Requires 3 TMUs, GL_COMBINE_EXT, and GL_ADD. 2014-09-20 01:08:13 +00:00
r_part.c r_part.c (R_EntityParticles): fix undefined behavior in the loop 2013-03-15 12:47:08 +00:00
r_sprite.c Make 'R_DrawSprite' error messages Con_DPrintf. 2011-11-19 23:33:54 +00:00
r_world.c r_world: Add a new R_DrawTextureChains_Multitexture_VBO function. Draws lightmapped surfaces with fulbrights in one pass, using the VBO. Requires 3 TMUs, GL_COMBINE_EXT, and GL_ADD. 2014-09-20 01:08:13 +00:00
render.h renamed model_t to qmodel_t in order to avoid conflicts on solaris. 2012-05-30 08:56:06 +00:00
resource.h bspfile.h, cdaudio.h, client.h, cmd.h, common.h, console.h, crc.h, cvar.h, 2010-02-21 00:01:08 +00:00
sbar.c remove isIntelVideo special handling, simply set gl_clear instead 2013-03-02 12:31:09 +00:00
sbar.h bspfile.h, cdaudio.h, client.h, cmd.h, common.h, console.h, crc.h, cvar.h, 2010-02-21 00:01:08 +00:00
screen.h removed the defunct block_drawing global (btw, it was checked incorrectly 2012-02-10 22:37:07 +00:00
server.h removed unused global host_time 2012-10-12 07:50:45 +00:00
snd_codec.c replace all ctype.h functions/macros and strcasecmp/strncasecmp() 2013-09-25 17:01:40 +00:00
snd_codec.h Merge several FS_* and snd_codec* layer updates from uhexen2 tree: 2013-09-25 11:01:12 +00:00
snd_codeci.h Merge several FS_* and snd_codec* layer updates from uhexen2 tree: 2013-09-25 11:01:12 +00:00
snd_dma.c sfx lowpass filter patch 2014-08-05 05:40:34 +00:00
snd_flac.c Merge several FS_* and snd_codec* layer updates from uhexen2 tree: 2013-09-25 11:01:12 +00:00
snd_flac.h added flac music support. 2013-07-21 14:02:06 +00:00
snd_mem.c * snd_codec: store the samplebits value in the snd_info_t struct, 2013-07-22 11:41:14 +00:00
snd_mikmod.c snd_mikmod.c: compile-time sanity checks for libmikmod version. 2013-12-27 12:00:21 +00:00
snd_mikmod.h Merge several FS_* and snd_codec* layer updates from uhexen2 tree: 2013-09-25 11:01:12 +00:00
snd_mix.c restore compilability with g++. some whitespace tidy-ups. 2014-09-02 05:40:41 +00:00
snd_modplug.c Merge several FS_* and snd_codec* layer updates from uhexen2 tree: 2013-09-25 11:01:12 +00:00
snd_modplug.h Merge several FS_* and snd_codec* layer updates from uhexen2 tree: 2013-09-25 11:01:12 +00:00
snd_mp3.c Merge several FS_* and snd_codec* layer updates from uhexen2 tree: 2013-09-25 11:01:12 +00:00
snd_mp3.h * snd_mpg123.c: added new codec for mp3 playback using libmpg123 as 2011-02-14 20:02:52 +00:00
snd_mpg123.c Merge several FS_* and snd_codec* layer updates from uhexen2 tree: 2013-09-25 11:01:12 +00:00
snd_opus.c Merge several FS_* and snd_codec* layer updates from uhexen2 tree: 2013-09-25 11:01:12 +00:00
snd_opus.h merged the opus codec support patch 2013-07-18 07:03:11 +00:00
snd_sdl.c SDL2 support, if USE_SDL2 defined. 2014-09-05 19:34:43 +00:00
snd_umx.c snd_umx: minor update from umr. minor correction to fshandle offset. 2014-02-11 20:00:35 +00:00
snd_umx.h Merge several FS_* and snd_codec* layer updates from uhexen2 tree: 2013-09-25 11:01:12 +00:00
snd_vorbis.c Merge several FS_* and snd_codec* layer updates from uhexen2 tree: 2013-09-25 11:01:12 +00:00
snd_vorbis.h some codec stuff syncing with uhexen2 2013-02-27 16:50:25 +00:00
snd_wave.c Merge several FS_* and snd_codec* layer updates from uhexen2 tree: 2013-09-25 11:01:12 +00:00
snd_wave.h Backported external music files support using decoder libraries and the 2011-01-05 19:50:43 +00:00
spritegn.h bspfile.h, cdaudio.h, client.h, cmd.h, common.h, console.h, crc.h, cvar.h, 2010-02-21 00:01:08 +00:00
strl_fn.h added strlcat.c and strlcpy.c: will use them later. 2011-12-27 11:03:39 +00:00
strlcat.c added strlcat.c and strlcpy.c: will use them later. 2011-12-27 11:03:39 +00:00
strlcpy.c added strlcat.c and strlcpy.c: will use them later. 2011-12-27 11:03:39 +00:00
sv_main.c pr_cmds.c, pr_exec.c, pr_edict.c, sv_main.c: Changed several Sys_Error() 2012-11-15 17:30:43 +00:00
sv_move.c initial import of SDL port of Fitzquake-0.85 / 20090510 sources. 2010-02-15 23:26:55 +00:00
sv_phys.c * first shot at cvar flag system and cvar layer clean-ups : 2011-12-28 22:01:33 +00:00
sv_user.c replace all ctype.h functions/macros and strcasecmp/strncasecmp() 2013-09-25 17:01:40 +00:00
sys.h renamed Sys_FloatTime to Sys_DoubleTime (the thing always returned double 2011-12-12 16:01:01 +00:00
sys_sdl_unix.c use getcwd() or some equivalent for host_parms->basedir instead of '.' (from uhexen2) 2014-09-10 09:51:35 +00:00
sys_sdl_win.c Add some missing SDL2 includes when not using sdl2-config. 2014-09-10 17:41:34 +00:00
vid.h SDL2 support, if USE_SDL2 defined. 2014-09-05 19:34:43 +00:00
view.c * first shot at cvar flag system and cvar layer clean-ups : 2011-12-28 22:01:33 +00:00
view.h bspfile.h, cdaudio.h, client.h, cmd.h, common.h, console.h, crc.h, cvar.h, 2010-02-21 00:01:08 +00:00
wad.c common.c (searchpath_t): Added new member `path_id', an unsigned 2011-01-02 21:45:16 +00:00
wad.h const correctness changes. 2010-08-29 02:22:55 +00:00
world.c renamed model_t to qmodel_t in order to avoid conflicts on solaris. 2012-05-30 08:56:06 +00:00
world.h bspfile.h, cdaudio.h, client.h, cmd.h, common.h, console.h, crc.h, cvar.h, 2010-02-21 00:01:08 +00:00
wsaerror.h * arch_def.h, net_sys.h, wsaerror.h: New headers, adapted from uhexen2. 2010-06-21 10:55:21 +00:00
zone.c bump default heap size to 72mb and zone size to 512kb in 64 bit builds. 2013-07-09 05:50:04 +00:00
zone.h const correctness changes. 2010-08-29 02:22:55 +00:00