Skip to content
Snippets Groups Projects
Commit c11ec62f authored by deuce's avatar deuce
Browse files

Don't use the old and stupid HAS_VSTAT/vstat.scaling stuff. Use the new

hotness setscaling() and getscaling() thingies.
parent 9b59c4b4
No related branches found
No related tags found
No related merge requests found
...@@ -38,10 +38,6 @@ static const KNOWNFOLDERID FOLDERID_ProgramData = {0x62AB5D82,0xFDC1,0x4DC3,{0x ...@@ -38,10 +38,6 @@ static const KNOWNFOLDERID FOLDERID_ProgramData = {0x62AB5D82,0xFDC1,0x4DC3,{0x
#include <filewrap.h> // STDOUT_FILENO #include <filewrap.h> // STDOUT_FILENO
#include "ciolib.h" #include "ciolib.h"
#undef HAS_VSTAT
#ifdef HAS_VSTAT
#include "bitmap_con.h"
#endif
#include "cterm.h" #include "cterm.h"
#include "st_crypt.h" #include "st_crypt.h"
...@@ -1174,9 +1170,7 @@ void load_settings(struct syncterm_settings *set) ...@@ -1174,9 +1170,7 @@ void load_settings(struct syncterm_settings *set)
get_syncterm_filename(set->list_path, sizeof(set->list_path), SYNCTERM_PATH_LIST, FALSE); get_syncterm_filename(set->list_path, sizeof(set->list_path), SYNCTERM_PATH_LIST, FALSE);
iniReadString(inifile, "SyncTERM", "ListPath", set->list_path, set->list_path); iniReadString(inifile, "SyncTERM", "ListPath", set->list_path, set->list_path);
set->scaling_factor=iniReadInteger(inifile,"SyncTERM","ScalingFactor",0); set->scaling_factor=iniReadInteger(inifile,"SyncTERM","ScalingFactor",0);
#ifdef HAS_VSTAT setscaling(set->scaling_factor);
vstat.scaling=set->scaling_factor;
#endif
/* Modem settings */ /* Modem settings */
iniReadString(inifile, "SyncTERM", "ModemInit", "AT&F&C1&D2", set->mdm.init_string); iniReadString(inifile, "SyncTERM", "ModemInit", "AT&F&C1&D2", set->mdm.init_string);
...@@ -1569,8 +1563,7 @@ int main(int argc, char **argv) ...@@ -1569,8 +1563,7 @@ int main(int argc, char **argv)
bbs=NULL; bbs=NULL;
} }
// Save changed settings // Save changed settings
#ifdef HAS_VSTAT if(getscaling() > 0 && getscaling() != settings.scaling_factor) {
if(vstat.scaling > 0 && vstat.scaling != settings.scaling_factor) {
char inipath[MAX_PATH+1]; char inipath[MAX_PATH+1];
FILE *inifile; FILE *inifile;
str_list_t inicontents; str_list_t inicontents;
...@@ -1583,13 +1576,12 @@ int main(int argc, char **argv) ...@@ -1583,13 +1576,12 @@ int main(int argc, char **argv)
else { else {
inicontents=strListInit(); inicontents=strListInit();
} }
iniSetInteger(&inicontents,"SyncTERM","ScalingFactor",vstat.scaling,&ini_style); iniSetInteger(&inicontents,"SyncTERM","ScalingFactor",getscaling(),&ini_style);
if((inifile=fopen(inipath,"w"))!=NULL) { if((inifile=fopen(inipath,"w"))!=NULL) {
iniWriteFile(inifile,inicontents); iniWriteFile(inifile,inicontents);
fclose(inifile); fclose(inifile);
} }
} }
#endif
uifcbail(); uifcbail();
#ifdef _WINSOCKAPI_ #ifdef _WINSOCKAPI_
if(WSAInitialized && WSACleanup()!=0) if(WSAInitialized && WSACleanup()!=0)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment