Changeset - r8748:2e88cf9f9879
[Not reviewed]
master
0 1 0
belugas - 16 years ago 2008-03-27 15:46:58
belugas@openttd.org
(svn r12444) -Fix: A little typo
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/misc_gui.cpp
Show inline comments
 
@@ -1424,49 +1424,49 @@ static void MakeSortedSaveGameList()
 
	uint sort_start = 0;
 
	uint sort_end = 0;
 
	uint s_amount;
 
	int i;
 

	
 
	/* Directories are always above the files (FIOS_TYPE_DIR)
 
	 * Drives (A:\ (windows only) are always under the files (FIOS_TYPE_DRIVE)
 
	 * Only sort savegames/scenarios, not directories
 
	 */
 
	for (i = 0; i < _fios_num; i++) {
 
		switch (_fios_list[i].type) {
 
			case FIOS_TYPE_DIR:    sort_start++; break;
 
			case FIOS_TYPE_PARENT: sort_start++; break;
 
			case FIOS_TYPE_DRIVE:  sort_end++;   break;
 
		}
 
	}
 

	
 
	s_amount = _fios_num - sort_start - sort_end;
 
	if (s_amount > 0)
 
		qsort(_fios_list + sort_start, s_amount, sizeof(FiosItem), compare_FiosItems);
 
}
 

	
 
static void GenerateFileName()
 
{
 
	/* Check if we are not a specatator who wants to generate a name..
 
	/* Check if we are not a spectator who wants to generate a name..
 
	    Let's use the name of player #0 for now. */
 
	const Player *p = GetPlayer(IsValidPlayer(_local_player) ? _local_player : PLAYER_FIRST);
 

	
 
	SetDParam(0, p->index);
 
	SetDParam(1, _date);
 
	GetString(_edit_str_buf, STR_4004, lastof(_edit_str_buf));
 
	SanitizeFilename(_edit_str_buf);
 
}
 

	
 
extern void StartupEngines();
 

	
 
static void SaveLoadDlgWndProc(Window *w, WindowEvent *e)
 
{
 
	static FiosItem o_dir;
 

	
 
	switch (e->event) {
 
		case WE_CREATE: // Set up OPENTTD button
 
			w->vscroll.cap = 10;
 
			w->resize.step_width = 2;
 
			w->resize.step_height = 10;
 

	
 
			o_dir.type = FIOS_TYPE_DIRECT;
 
			switch (_saveload_mode) {
 
				case SLD_SAVE_GAME:
0 comments (0 inline, 0 general)