Fixed #287: size not propertly restored on launch on Windows

This commit is contained in:
casey langen 2019-12-25 14:38:09 -08:00
parent 97ab0b46c9
commit 1504e48680
2 changed files with 9 additions and 8 deletions

View File

@ -2457,13 +2457,14 @@ INLINE int set_up_window( void)
debug_printf( "WindowTitle = '%ls'\n", WindowTitle);
#endif
get_default_sizes_from_registry( &n_default_columns, &n_default_rows, &xloc, &yloc,
&menu_shown);
if( PDC_n_rows > 2 && PDC_n_cols > 2)
if (PDC_n_rows > 2 && PDC_n_cols > 2)
{
n_default_columns = PDC_n_cols;
n_default_rows = PDC_n_rows;
n_default_rows = PDC_n_rows;
}
get_default_sizes_from_registry( &n_default_columns, &n_default_rows, &xloc, &yloc,
&menu_shown);
if( ttytype[1])
PDC_set_resize_limits( (unsigned char)ttytype[0],
(unsigned char)ttytype[1],

View File

@ -108,10 +108,10 @@ int main(int argc, char* argv[]) {
#ifdef WIN32
musik::core::RemoveOldDlls();
AddDllDirectory(u8to16(musik::core::GetPluginDirectory()).c_str());
#ifdef __PDCURSES__
PDC_set_resize_limits(MIN_HEIGHT, 1000, MIN_WIDTH, 1000);
resize_term(26, 100); /* must be before app init */
#endif
#ifdef __PDCURSES__
PDC_set_resize_limits(MIN_HEIGHT, 1000, MIN_WIDTH, 1000);
resize_term(26, 100); /* must be before app init */
#endif
#endif
std::string errorFn = musik::core::GetDataDirectory() + "stderr.txt";