diff options
author | Rob Haarsma <phaseIV@zonnet.nl> | 2004-01-08 02:33:40 +0300 |
---|---|---|
committer | Rob Haarsma <phaseIV@zonnet.nl> | 2004-01-08 02:33:40 +0300 |
commit | d959b8127baff7a43230546324f556361277a7c4 (patch) | |
tree | 48bc260069fd0e20084a5b2606fca27016d264dc | |
parent | f0821decffaf316715df7fbf2a1e3b64b480edc8 (diff) |
Applied Daniel Fairhead's patch for a correct working DELKEY in textinput buttons.
(thanks!)
Added a 'void' somewhere to silence a compiler warning.
(Windows only)
Moved the flip fullscreen button in the topheader a little to the right, since the
questionmark button mysteriously disappeared.
-rw-r--r-- | source/blender/src/header_info.c | 4 | ||||
-rw-r--r-- | source/blender/src/interface.c | 21 | ||||
-rw-r--r-- | source/blender/src/mainqueue.c | 1 | ||||
-rw-r--r-- | source/blender/src/renderwin.c | 2 |
4 files changed, 14 insertions, 14 deletions
diff --git a/source/blender/src/header_info.c b/source/blender/src/header_info.c index 1f670250be5..8131cd97871 100644 --- a/source/blender/src/header_info.c +++ b/source/blender/src/header_info.c @@ -1739,11 +1739,11 @@ void info_buttons(void) #ifdef _WIN32 // FULLSCREEN if(U.uiflag & FLIPFULLSCREEN) { uiDefIconBut(block, BUT, B_FLIPFULLSCREEN, ICON_WINDOW_WINDOW, - (short)(curarea->winx-(XIC*2)-2), 0,XIC,YIC, + (short)(curarea->winx-(XIC-5)), 0,XIC,YIC, 0, 0, 0, 0, 0, "Toggles Blender to fullscreen mode");/* dir */ } else { uiDefIconBut(block, BUT, B_FLIPFULLSCREEN, ICON_WINDOW_FULLSCREEN, - (short)(curarea->winx-(XIC*2)-2), 0,XIC,YIC, + (short)(curarea->winx-(XIC-5)), 0,XIC,YIC, 0, 0, 0, 0, 0, "Toggles Blender to fullscreen mode");/* dir */ } #endif diff --git a/source/blender/src/interface.c b/source/blender/src/interface.c index c7a61873a4e..c79affdf6ca 100644 --- a/source/blender/src/interface.c +++ b/source/blender/src/interface.c @@ -1183,16 +1183,14 @@ static int ui_do_but_TEX(uiBut *but) else if(dev==MOUSEY) val= 0; if(ascii) { - if( ascii>31 && ascii<127) { - if(len < but->max) { - for(x= but->max; x>but->pos; x--) - str[x]= str[x-1]; - str[but->pos]= ascii; - but->pos++; - len++; - str[len]= '\0'; - dodraw= 1; - } + if(len < but->max) { + for(x= but->max; x>but->pos; x--) + str[x]= str[x-1]; + str[but->pos]= ascii; + but->pos++; + len++; + str[len]= '\0'; + dodraw= 1; } } else if(val) { @@ -1234,7 +1232,8 @@ static int ui_do_but_TEX(uiBut *but) str[--len]='\0'; dodraw= 1; } - + break; + case BACKSPACEKEY: if(len!=0) { if(get_qual() & LR_SHIFTKEY) { diff --git a/source/blender/src/mainqueue.c b/source/blender/src/mainqueue.c index 7d816283045..a686f490c5d 100644 --- a/source/blender/src/mainqueue.c +++ b/source/blender/src/mainqueue.c @@ -57,6 +57,7 @@ unsigned short mainqread(short *val, char *ascii) *val= mainqueue[nevents].val; *ascii= mainqueue[nevents].ascii; + if((*ascii<30)||(*ascii>126)) *ascii=0; return mainqueue[nevents].event; } else return 0; diff --git a/source/blender/src/renderwin.c b/source/blender/src/renderwin.c index 562c46abbab..41fc1122e0c 100644 --- a/source/blender/src/renderwin.c +++ b/source/blender/src/renderwin.c @@ -682,7 +682,7 @@ static void printrenderinfo_cb(double time, int sample) /* -------------- callback system to allow ESC from rendering ----------------------- */ /* POSIX & WIN32: this function is called all the time, and should not use cpu or resources */ -static int test_break() +static int test_break(void) { if(G.afbreek==2) { /* code for testing queue */ |