Previous 15994 Revisions Next

r7846 Saturday 17th April, 2010 at 22:28:02 UTC by Firewave
[NEWUI] Renamed some variables to properly reflect type
[src/mess/osd/windows]dialog.c menu.c

src/mess/osd/windows/dialog.c
r7845r7846
819819   // create our own copy of the string
820820   if (item_label)
821821   {
822      TCHAR* tmp = tstring_from_utf8(item_label);
823      if( !tmp )
822      TCHAR* t_tmp = tstring_from_utf8(item_label);
823      if( !t_tmp )
824824         return 1;
825      t_item_label = win_dialog_tcsdup(dialog, tmp);
826      global_free(tmp);
825      t_item_label = win_dialog_tcsdup(dialog, t_tmp);
826      global_free(t_tmp);
827827      if (!t_item_label)
828828         return 1;
829829   }
src/mess/osd/windows/menu.c
r7845r7846
848848   struct file_dialog_params *params;
849849   int has_option;
850850   TCHAR t_buf1[128];
851   char *buf1;
851   char *utf8_buf1;
852852
853853   params = (struct file_dialog_params *) changed_param;
854854
r7845r7846
873873   {
874874      // get label text, removing trailing NULL
875875      GetWindowText(wnd, t_buf1, ARRAY_LENGTH(t_buf1));
876      buf1 = utf8_from_tstring(t_buf1);
877      assert(buf1[strlen(buf1)-1] == ':');
878      buf1[strlen(buf1)-1] = '\0';
876      utf8_buf1 = utf8_from_tstring(t_buf1);
877      assert(utf8_buf1[strlen(utf8_buf1)-1] == ':');
878      utf8_buf1[strlen(utf8_buf1)-1] = '\0';
879879
880880      // find guide entry
881      while(guide->option_type && strcmp(buf1, guide->display_name))
881      while(guide->option_type && strcmp(utf8_buf1, guide->display_name))
882882         guide++;
883883
884884      wnd = GetNextWindow(wnd, GW_HWNDNEXT);
r7845r7846
894894            has_option ? guide : NULL,
895895            has_option ? optspec : NULL);
896896      }
897      global_free(buf1);
897      global_free(utf8_buf1);
898898   }
899899}
900900

Previous 15994 Revisions Next


© 1998-2018 The MESS Team