foxygit / doom Log in
commit d06dcf916776e58b1f476cf9320b5274a28957b1
Merge: d91e3e86 24783792
Author:     Simon Howard <fraggle@gmail.com>
AuthorDate: Thu Jul 9 17:50:04 2009 +0000
Commit:     Simon Howard <fraggle@gmail.com>
CommitDate: Thu Jul 9 17:50:04 2009 +0000

    Merge from trunk.

    Subversion-branch: /branches/raven-branch
    Subversion-revision: 1610

 NEWS                    |  44 ++++
 configure.in            |   1 +
 pkg/wince/.gitignore    |   3 +
 pkg/wince/Makefile.am   |  10 +
 pkg/wince/wince-cab.cfg |  25 ++
 pkg/wince/wince-cabgen  | 672 ++++++++++++++++++++++++++++++++++++++++++++++++
 src/i_system.c          |  50 +++-
 src/i_video.c           |  11 +-
 src/setup/execute.c     | 143 +++++++++--
 9 files changed, 921 insertions(+), 38 deletions(-)

diff --cc configure.in
index 9fac0bc1,4b29cee5..d4ebafab
--- a/configure.in
+++ b/configure.in
@@@ -106,16 -103,13 +106,17 @@@ Makefil
  wince/Makefile
  textscreen/Makefile
  textscreen/examples/Makefile
 -setup/Makefile
  man/Makefile
  src/Makefile
 +src/doom/Makefile
 +src/heretic/Makefile
 +src/hexen/Makefile
 +src/setup/Makefile
  pcsound/Makefile
+ pkg/wince/Makefile
  src/resource.rc
 +src/setup-res.rc
 +src/setup/setup-manifest.xml
  src/doom-screensaver.desktop
 -setup/setup-res.rc
  ])

diff --cc src/i_system.c
index 0ec8e185,5e19d407..c6deb905
--- a/src/i_system.c
+++ b/src/i_system.c
@@@ -55,30 -59,10 +55,32 @@@
  #include "w_wad.h"
  #include "z_zone.h"

+ #define MIN_RAM  4 /* MiB */
+
  int mb_used = 16;
 -int show_endoom = 1;
 +
 +typedef struct atexit_listentry_s atexit_listentry_t;
 +
 +struct atexit_listentry_s
 +{
 +    atexit_func_t func;
 +    boolean run_on_error;
 +    atexit_listentry_t *next;
 +};
 +
 +static atexit_listentry_t *exit_funcs = NULL;
 +
 +void I_AtExit(atexit_func_t func, boolean run_on_error)
 +{
 +    atexit_listentry_t *entry;
 +
 +    entry = malloc(sizeof(*entry));
 +
 +    entry->func = func;
 +    entry->run_on_error = run_on_error;
 +    entry->next = exit_funcs;
 +    exit_funcs = entry;
 +}

  // Tactile feedback function, probably used for the Logitech Cyberman

diff --cc src/i_video.c
index a938b1f8,3412051b..6f82e60a
--- a/src/i_video.c
+++ b/src/i_video.c
@@@ -656,13 -480,32 +656,16 @@@ void I_GetEvent(void
          switch (sdlevent.type)
          {
              case SDL_KEYDOWN:
 +                // data1 has the key pressed, data2 has the character
 +                // (shift-translated, etc)
                  event.type = ev_keydown;
                  event.data1 = TranslateKey(&sdlevent.key.keysym);
 -
 -                // If Vanilla keyboard mapping enabled, the keyboard
 -                // scan code is used to give the character typed.
 -                // This does not change depending on keyboard layout.
 -                // If you have a German keyboard, pressing 'z' will
 -                // give 'y', for example.  It is desirable to be able
 -                // to fix this so that people with non-standard
 -                // keyboard mappings can type properly.  If vanilla
 -                // mode is disabled, use the properly translated
 -                // version.
 -
 -                if (vanilla_keyboard_mapping)
 -                {
 -                    event.data2 = event.data1;
 -                }
 -                else
 -                {
 -                    event.data2 = sdlevent.key.keysym.unicode;
 -                }
 +                event.data2 = GetTypedChar(&sdlevent);

-                 D_PostEvent(&event);
+                 if (event.data1 != 0)
+                 {
+                     D_PostEvent(&event);
+                 }
                  break;

              case SDL_KEYUP:
diff --cc src/setup/execute.c
index 1b510f2e,03a4f65c..18a07156
--- a/src/setup/execute.c
+++ b/src/setup/execute.c
@@@ -200,17 -316,13 +303,13 @@@ int ExecuteDoom(execute_context_t *cont
      response_file_arg = malloc(strlen(context->response_file) + 2);
      sprintf(response_file_arg, "@%s", context->response_file);

-     argv[0] = GetExecutableName();
-     argv[1] = response_file_arg;
-     argv[2] = NULL;
-
      // Run Doom

-     result = ExecuteCommand(argv);
 -    result = ExecuteCommand(DOOM_BINARY, response_file_arg);
++    result = ExecuteCommand(GetExecutableName(), response_file_arg);

      free(response_file_arg);
-
-     // Destroy context
+
+     // Destroy context
      remove(context->response_file);
      free(context->response_file);
      free(context);