Skip to content

Commit

Permalink
Merge pull request firemodels#1903 from gforney/master
Browse files Browse the repository at this point in the history
fixes when open dialog box was used to select case  - fix initial scene freezing, make startup files content consistent
  • Loading branch information
gforney authored May 9, 2024
2 parents a0fd700 + 915831c commit 0b064fd
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 16 deletions.
2 changes: 1 addition & 1 deletion Source/smokebot_trigger.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
master: dummy text to trigger smokebot
master: dummy text to trigger smokebot
devel: dummy text to trigger smokebot
devel2: dummy text to trigger smokebot
test: dummy text to trigger smokebot
14 changes: 0 additions & 14 deletions Source/smokeview/callbacks.c
Original file line number Diff line number Diff line change
Expand Up @@ -986,13 +986,6 @@ void MouseCB(int button, int state, int xm, int ym){
}
#endif

{
float delta_time;

delta_time = glutGet(GLUT_ELAPSED_TIME)/1000.0 - timer_reshape;
if(delta_time<DELTA_TIME)return;
}

if(autofreeze_volsmoke==ON&&nvolsmoke_loaded>0){
if(state==GLUT_DOWN)GLUIUpdateFreeze(ON);
if(state==GLUT_UP)GLUIUpdateFreeze(OFF);
Expand Down Expand Up @@ -1455,12 +1448,6 @@ void MouseDragCB(int xm, int ym){
ym *= 2;
}
#endif
{
float delta_time;

delta_time = glutGet(GLUT_ELAPSED_TIME)/1000.0 - timer_reshape;
if(delta_time<DELTA_TIME)return;
}

in_external=0;
#ifdef pp_GPUTHROTTLE
Expand Down Expand Up @@ -3643,7 +3630,6 @@ void SetScreenSize(int *width, int *height){
/* ------------------ ReshapeCB ------------------------ */

void ReshapeCB(int width, int height){
START_TIMER(timer_reshape);
if(disable_reshape==1)return;
updatemenu=1;
if(update_reshape==0){
Expand Down
17 changes: 17 additions & 0 deletions Source/smokeview/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,23 @@ char *ProcessCommandLine(CommandlineArgs *args) {
NewMemory((void **)&filename_local, (unsigned int)filelength);
OpenSMVFile(filename_local, filelength, &openfile);
if(openfile == 1 && ResizeMemory((void **)&filename_local, strlen(filename_local) + 1) != 0){
char *dirlast = NULL, *caselast = NULL;

FREEMEMORY(smokeview_casedir);
FREEMEMORY(fdsprefix);
NewMemory((void **)&smokeview_casedir, strlen(filename_local) + 1);
NewMemory((void **)&fdsprefix, strlen(filename_local) + 1);
strcpy(smokeview_casedir, filename_local);
dirlast = strrchr(smokeview_casedir, '\\');
if(dirlast != NULL){
strcpy(filename_local, dirlast + 1);
strcpy(fdsprefix, filename_local);
caselast = strrchr(fdsprefix, '.');
if(caselast != NULL)caselast[0] = 0;
dirlast[1] = 0;
len_casename = strlen(filename_local);
}
CHDIR(smokeview_casedir);
}
else{
FREEMEMORY(filename_local);
Expand Down
1 change: 0 additions & 1 deletion Source/smokeview/smokeviewvars.h
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,6 @@ SVEXTERN int SVDECL(update_times,0);
SVEXTERN int SVDECL(show_geom_bndf, 0),SVDECL(glui_show_geom_bndf, 0);
SVEXTERN int SVDECL(update_windrose, 0);
SVEXTERN int SVDECL(update_use_lighting, 0), SVDECL(use_lighting, 1);
SVEXTERN float SVDECL(timer_reshape, 0.0);
SVEXTERN int SVDECL(update_device, 0);

SVEXTERN cellmeshdata SVDECL(*cellmeshinfo, NULL);
Expand Down

0 comments on commit 0b064fd

Please sign in to comment.