#bitfighter IRC Log

Index Search ←Prev date Next date→

IRC Log for 2011-12-03

Timestamps are in GMT/BST.

00:00:00raptorok, down to 50 revs
00:02:00raptorargh, i can't compile any of these revisions..
00:03:00sam686between what revision?
00:03:00raptorfinally down to 25
00:03:00raptorok
00:03:00raptorlet me try to narrow it once more for you
00:06:00Watusimotonever knew about bisect -- looks like a very cool command
00:08:00raptorit's great for tracking down the really hard bugs to find
00:09:00raptorbut only if all the revisions compile...
00:09:00Watusimoto:-)
00:15:00raptorok sam, this is for sure a bad revision: bad -> 7346a41bb264
00:16:00raptorand this is a good one: good -> f08a7b5d5707
00:16:00raptorthe tree forks at f08a7b5d5707
00:16:00raptoryours and mine side of the fork is all good
00:17:00raptorso only deal with watusimoto's revisions in between those two
00:17:00raptori can't compile any of them
00:18:00Watusimotoso by good you mean alt-enter works as it should, and bad, it works as it does now
00:18:00raptorcorrect
00:18:00Watusimotoand you seem to be implying that since all checkins in the interval are mine, I may have broken it
00:18:00Watusimotoright?
00:18:00raptoryes :)
00:18:00Watusimotook, well, we'll see
00:18:00raptorhehe
00:19:00raptori didn't think i was implying - i thought i was explicit :-D
00:19:00raptorbut i am old enough to know i could be completely wrong
00:19:00sam686so, limited somewhere in here? http://208.107.52.15/hg.php/graph/7346a41bb264?revcount=32
00:19:00raptorsam686: exactly
00:20:00sam686what problem are you looking for again?
00:20:00raptor9f72afd6adfe is good though, so that rules out the bottom merge and our side of the branch
00:20:00raptorsam686: start the game, press and hold ALT, press ENTER repeatedly
00:20:00raptorif screen mode changes = good
00:21:00raptorif it changes with each ENTER press, I mean
00:22:00sam686is it this? http://208.107.52.15/hg.php/rev/6984352c6d87
00:22:00raptorcould be, but i can't test
00:23:00sam686you could test it my simply taking your later revision, and undoing that event.cpp changes
00:23:00sam686as in later revision that compile for you
00:24:00raptorsounds too simple....
00:24:00raptorok i'll do it - it's simple enough
00:26:00raptorthat was it!
00:27:00raptori applied a reverse patch of 6984352c6d87 and later revisions worked
00:27:00raptorWatusimoto: this is the one that broke it: 6984352c6d87
00:28:00sam686i don't think that will fix a problem with this problem. enter editor, hold W, press alt+enter, and it stops scrolling while holding down W
00:28:00raptorlet me see..
00:28:00sam686i think that problem started ever since the move to SDL
00:28:00raptorhave you tested?
00:28:00Watusimotodon't think http://208.107.52.15/hg.php/rev/6984352c6d87 is the problem
00:29:00Watusimotowait
00:29:00Watusimotowhat?
00:29:00raptorso that means we are talking about 2 different problems: the alt+enter one and the editor one
00:29:00raptoryes?
00:29:00Watusimotoah
00:30:00WatusimotoI don't think this could fix the problem I saw
00:30:00sam686the editor one "hold W and press alt+enter" problem may have started ever since the move to SDL...
00:31:00Watusimotosam's problem was the result of the the spurious key event being fired by changing video mode
00:31:00Watusimotoas was mine
00:31:00Watusimotothe change may have unmasked that, but wasn't the cause
00:32:00raptorso how come the alt + enter problem was mentioned?
00:32:00raptorjust a thought that it may be related?
00:32:00Watusimotobecause that fixed a different alt-enter problem
00:32:00sam686you press alt+enter while pressing W to scroll in editor, and then it stop scrolling while holding down W button...
00:33:00sam686as if SDL thinks the keys get released when switch to fullscreen / windowed
00:33:00Watusimotoin that case, if you held alt down, then changed focus, then released alt, when you came back to bf, you could just press enter and the game mode would change
00:34:00Watusimotobecause bf didn't know you had released alt
00:34:00Watusimotothis was a big problem when using alt-tab to change focus
00:36:00raptorthat doesn't happen to me
00:36:00raptorwith that change reverted
00:37:00Watusimotohmmm...
00:37:00sam686the revision http://208.107.52.15/hg.php/rev/6984352c6d87 may be a windows only problem i think...
00:37:00sam686might be due to GLUT vs freeGLUT
00:37:00sam686i mean different version od SDL
00:37:00raptorand it may be fixed since i updated teh SDL dll to 1.2.14+ for windows
00:37:00raptorsam686: could you do a quick test to see if that is still a problem?
00:38:00sam686ok..
00:38:00raptori just changed the one line to: note that i did update the windows DLL
00:38:00raptoroops
00:38:00raptorif(key == SDLK_RETURN && (mod & KMOD_ALT))
00:38:00raptorthere we go
00:38:00raptoron the latest revision
00:40:00Watusimotook, with this code, I still see the alt bug
00:40:00Watusimotohttp://pastie.org/2957672
00:41:00raptorrats
00:41:00raptorbut then quick switching works...
00:41:00Watusimotohere's a great way to test
00:41:00Watusimotogo into f7 mode
00:41:00Watusimotopress some keys
00:41:00Watusimotohit alt-enter
00:42:00raptoryep gets released just fine...
00:42:00Watusimotoall indications that the key is pressed disappear
00:42:00sam686ok, i stick in a printf("%i\n", mod); and it thinks i am not holding down ALT when i am after pressing enter (hold down alt)
00:42:00sam686looks like (mod & KMOD_ALT) and getInputCodeState(KEY_ALT) makes no difference...
00:43:00raptorsam686: i was meaning for that change to test Watusimoto's first bug (the reason for that change)
00:43:00raptorso if you press ALT + TAB out of the game
00:44:00raptorand ALT + TAB back in, does just the ENTER button cause a screen change?
00:44:00raptor(without ALT)
00:44:00sam686does this look like i did the code? printf("%i\n", mod);
00:44:00sam686
00:44:00sam686 // ALT + ENTER --> toggles window mode/full screen
00:44:00sam686 if(key == SDLK_RETURN && (mod & KMOD_ALT))
00:44:00sam686 game->getUIManager()->getOptionsMenuUserInterface()->toggleDisplayMode();
00:44:00raptoryes
00:44:00sam686that what i did, but added a printf("%i\n", mod);
00:44:00Watusimotomay I misdescribed the bug
00:46:00raptorok, nevermind about that old bug... onwards to the new one - i guess i'm getting you guys off track
00:46:00sam686i hink we sould just ignore the Event::onKeyDown stuff and look for a way to fix "W" key somehow get released switching to fullscreen
00:46:00sam686or any / all keys get released on switch to fullscreen...
00:47:00raptorso... how important is it actually for the key events to continue with switching screen modes?
00:47:00sam686not just "w", it happens to all keyboard buttons
00:47:00raptorbecause it doesn't seem important to me
00:47:00Watusimotothe only real time I think it is bad is when you hold alt and press enter twice to switch two modes forward
00:47:00Watusimotoor when you are cycling through
00:48:00Watusimotoso if I could fix that one case, i could live with the other cases
00:48:00Watusimotonot sure we can, though
00:48:00sam686switch to fullscreen causes sdl to think you release all keyboard buttons including "ALT"
00:49:00Watusimotomaybe we can fashion an event to tell sdl we're pressing alt again
00:49:00Watusimotounless this is a system problem
00:49:00raptorok, so
00:50:00raptorto get the screen mode cycling back all we have to do is revert 6984352c6d87
00:50:00raptorBUT that adds another annoyance
00:50:00raptorcorrect?
00:51:00sam6866984352c6d87 doesn't make a difference on my windows SDL, same problem with "alt get released" on my windows xp
00:52:00WatusimotoThe code in that pastie, which I think is a reversion, did not fix the alt-enter problem for me on windows
00:52:00sam686http://208.107.52.15/hg.php/rev/6984352c6d87 (if you need to see changes)
00:52:00raptorok, i'm getting out my windows VM...
00:52:00Watusimoto:-)
00:52:00raptorsomewhere...
00:52:00raptorit's a tough life being in the minority...
00:54:00raptorhow can you guys live with compiling so slow??
00:55:00sam686i think Watusimoto and raptor computer is much faster then me...
00:55:00Watusimotonot this one
00:55:00raptorspeaking of which - i should continue my header clean-up...
00:57:00sam686maybe, older version of SDL might have make a difference on the alt+enter problem on 6984352c6d87
00:58:00raptorok, i finally see what you mean
00:58:00raptorALT + ENTER cycling NEVER worked on windows
01:00:00Watusimotoworked in 015a
01:00:00raptor(with SDL...)
01:00:00Watusimotomaybe so
01:01:00sam686015a may have a operating system specific on reading alt / ctrl states (that happen to read it even when not on focus)..
01:02:00raptorwhat about something like this: http://pastie.org/2957734
01:02:00raptoras a solution
01:02:00raptorjust found it randomly on the web
01:02:00raptorusing SDL_SetEventFilter
01:02:00raptorhttp://sdl.beuc.net/sdl.wiki/SDL_SetEventFilter
01:05:00sam686it might or might not work, it depends on if SDL incorrectly thinks you not holding down ALT anymore when you actually are...
01:07:00raptorwell, i need to go home, i might not get farther in this. but if either of you try the event filter, let me know if it works
01:09:00raptor Quit (Remote host closed the connection)
01:48:00Watusimoto Quit (Ping timeout: 258 seconds)
09:17:00Watusimoto has joined
09:35:00koda has joined
10:47:00Watusimotosadly, the sdl event filter doesn't help. It's a pretty cool contstruct though!
11:02:00Watusimotohowever...
11:03:00Watusimotopushing a fake key-down event for the alt-key onto the sdl event stack does seem to work. now I need to figure out how to create one. right now, I'm capturing the first keystroke and using that to inject later on, but it only works if the very first thing the user does when firing up bf is press alt
11:03:00Watusimotoprobably not the most optimal long-term design.
11:04:00Watusimotobut this should fix things enough
11:04:00Watusimotoso now I need to disect the sdl event such that I can recreate it programatically
11:04:00Watusimotowhat a distraction
11:12:00Watusimoto Quit (Ping timeout: 260 seconds)
11:41:00raptor has joined
11:41:00ChanServ sets mode +o raptor
12:41:00LordDVG has joined
13:20:00raptor Quit (Remote host closed the connection)
13:27:00raptor has joined
13:27:00ChanServ sets mode +o raptor
13:31:00raptoranyone else awake?
13:31:00sam686hi
13:32:00raptorhi, can I send you a patch
13:32:00raptorthat fixes the alt + enter, multiple times problem in windows?
13:32:00sam686i can try..
13:33:00sam686oh, patch?
13:33:00raptoryeah, patch to the latest commit
13:33:00raptorsmall patch
13:34:00raptorhere: http://sam686.maxhushahn.com/upload/saveModState.diff
13:38:00sam686umm, strange problem now, not it thinks i am holding down ALT when i am not anymore, as in pressing enter without alt switched to fullscreen
13:38:00raptorwhat?
13:38:00raptorhow did you do that?
13:39:00sam686SDL thinks i am holding alt when i am not anymore
13:39:00raptorargh
13:39:00raptorok, one moment...
13:40:00raptorrats
13:40:00raptorok, i failed...
13:44:00sam686another problem i found on SDL is it doesn't listen to the windows control panel key repeat options
13:45:00raptori don't understand that...
13:46:00sam686http://sam686.maxhushahn.com/bitfighter/keyboard_options.png
13:47:00sam686sdl won't listen to that options set on that keyboard properties, while GLUT does (015a)
13:48:00raptoroh yes, very true
13:48:00raptorSDL allows for setting that itself if wanted
13:50:00sam686all i see in SDL is SDL_EnableKeyRepeat(int delay, int interval), i don't see a way to have it listen to windows keyboard repeat delat / rate option
13:50:00raptorit doesn't - it handles it completely itself (which is what I was meaning)
13:51:00raptorso if you want to change the repeat, you'd have to do it in game with an option
13:55:00sam686SDL also took away the ability to key repeat 2 letters at the same time (pressing H on one keyboard, and I on another keyboard)
13:55:00raptoron differente keyboards?
13:56:00sam686yes, i have 2 keyboards...
14:05:00CrazyLinuxNerd Quit (Quit: Leaving)
14:19:00raptori am testing another idea I have for the key state loss upon screen mode switch
14:31:00raptorfailed again
14:31:00raptorok, i'm going back to bed...
14:31:00sam686ok, too sleepy in the morning?
14:31:00raptorwoke up 3 hours ago...
14:32:00raptorneed to make some of it up..
14:32:00sam686i happen to wake up todat at the same tine you join IRC
14:32:00raptorearly riser
14:32:00raptorok, i'll be back later
14:33:00sam686later..
14:33:00raptor Quit (Remote host closed the connection)
14:34:00LordDVG Quit (Remote host closed the connection)
15:16:00Watusimoto has joined
15:29:00Watusimotoactually, the injection method has problems as well
15:53:00sam686 Quit (Ping timeout: 258 seconds)
15:53:00sam686 has joined
15:53:00ChanServ sets mode +v sam686
16:37:00raptor has joined
16:37:00ChanServ sets mode +o raptor
16:40:00raptori guess it's christmas music time in our house...
16:40:00raptoralso i have another idea for the key state changes...
16:47:00raptor Quit (Remote host closed the connection)
16:52:00raptor has joined
16:52:00ChanServ sets mode +o raptor
16:53:00raptorso what i did was pass all keyboard input to the InputCode system first, then checked if InputCode ALT and ENTER were down
16:53:00raptorthen
16:53:00raptorI saved an InputCode snapshot to a different array before SDL_SetVideoMode and restored it afterwards
16:54:00raptorbut i'm missing something...
17:16:00raptorso any loss of window focus put the key up
17:19:00sam686the "F7" screen is a best way to see any key up problem..
17:19:00raptorit doesn't do raw sdl
17:19:00sam686i found that holding down a button, change window then back to bitfighter, makes SDL think not holding down the button anymore
17:24:00Watusimoto Quit (Ping timeout: 248 seconds)
17:24:00Watusimoto_ has joined
17:29:00sam686interesting problem with "caps lock" button, press once, it says you holding down forever, press again, then it says you not holding down anymore, in SDL
17:30:00sam686it gets even more interesting if "caps lock" is mapped to "Activate module 2"
17:30:00sam686of cource, GLUT seem to not detect "caps lock" at all (015a)...
17:31:00Watusimoto_ Quit (Ping timeout: 244 seconds)
17:39:00raptorcaps lock is supposed to act like that at the OS level isn't it?
17:39:00raptoras a toggle
17:40:00sam686the same happens to "num lock" as a toggle
17:41:00raptorprobably scroll lock, too
17:42:00sam686the toggle doesn't happen to scroll lock, though it does toggle the "scroll lock" light on or off.
17:42:00raptorreally? that's probably a bug
17:44:00sam686also, the strange part is, the scroll lock and number lock GLUT somethimes says the opposite of what the keyboard light indicator says..
17:44:00sam686i mean SDL, not glut
17:45:00sam686though, caps lock does correctly work all the time in SDL when typing chat...
17:47:00raptori've seen the keyboard light not correct on many OSes
17:49:00sam686my keyboard light indicater for cap lock and scroll lock does appear to be correct all the time, probably scroll lock too...
17:49:00sam686even with a second keyboard plugged in, both keyboard light indicated shows up the same all the time..
17:49:00raptorwhen i say 'not correct', i mean i've seen it wrong a few times a year...
17:49:00raptorbecause it is the OS that sends the command to light up the keyboard
17:53:00raptor Quit (Remote host closed the connection)
17:53:00raptor has joined
17:53:00ChanServ sets mode +o raptor
17:55:00raptorhave another idea...
17:56:00sam686i have a few keyboard buttons that gaves sdl a problem: "Unknown key detected: 0"
17:56:00raptoryes
17:56:00raptorwe didn't enumerate ALL of them, but close
17:59:00sam686how is SDL suppose to tell a difference between "back" and "Forward" button if they are both zero?
18:00:00raptori don't knwo what those buttons are?
18:00:00raptorfor joystick?
18:00:00sam686its a keyboard button of what I have...
18:01:00sam686maybe i should take a little camera screen of my keyboard...
18:02:00raptoris it one of those 'web buttons' ?
18:02:00raptorbecause i think SDL 1.2 doesn't do the 'web' buttons
18:04:00raptoractually i don't think it's SDL_SetVideoMode that is triggering the keyUp event
18:06:00raptori think i was sent on a wild goos chase..
18:08:00sam686Here my keyboard
18:08:00sam686http://208.107.52.15/upload/2011-12-03-120318.jpg
18:08:00sam686http://208.107.52.15/upload/2011-12-03-120427.jpg
18:08:00sam686http://208.107.52.15/upload/2011-12-03-120448.jpg
18:08:00raptorinteresting
18:09:00raptori think those are the infamous 'web' buttons
18:09:00sam686my keyboard have a "f-lock" light indicater as well, that is probably not detected by operating system at all..
18:09:00sam686with an "f-lock" button
18:10:00sam686f-lock off = insert / back / forward button, f-lock on = print screen / scroll lock / pause-break
18:10:00raptorweird
18:12:00sam686SDL seems to detect F1-F12 even with f-lock off (usually my keyboard needs F-lock on to do F1-F12)
18:12:00raptoryeah those are standard
18:19:00sam686theres something wrong with glut, holding down W button, go fullscreen, SDL thinks i released a W button, but i press W on second keyboard while holdong down W button on main keyboard, and SDL still thinks i am not holding down W, until i release one of W button..
18:20:00sam686its as if SDL is keeping its own key down tables to try to avoid sending more then one keydown without keyup
18:24:00sam686it will help if i can see SDL source code, and maybe have ability to compile SDL...
18:25:00raptorhg clone -u SDL-1.2 http://hg.libsdl.org/SDL SDL-1.2
18:25:00raptoris how you get it
18:26:00raptorgotta go for a bit...
18:26:00sam686o9k
18:26:00sam686ok
18:26:00raptori think a KEY_UP event is being sent from a different thread than what the game runs
18:26:00raptorbecause I've effectively disabled KEY_UP from being fired when calling screen mode change, but it is still fired afterwards
18:28:00raptor Quit (Remote host closed the connection)
19:08:00LordDVG has joined
19:49:00Watusimoto has joined
19:57:00WatusimotoI'm going to focus on another problem this evening, but one approach might be to look at how other games handle switching modes. if we got rid of the alt-enter shortcut, the problem would be solved (enough). I dowloaded the code for bzflag, and will look at it sometime.
21:47:00CrazyLinuxNerd has joined
22:23:00LordDVG Quit (Remote host closed the connection)
22:26:00raptor has joined
22:26:00ChanServ sets mode +o raptor
22:29:00raptori've taken a look at at least 4 other SDL games: none of them handle the case
22:30:00sam686http://208.107.52.15/bitfighter/SDL_fullscreen_switch_and_keyrepeat_patch.txt
22:31:00raptorhaha
22:31:00raptoryou built SDL yourself?
22:31:00raptor:)
22:31:00sam686i kind of change it to have a more native key repeat system (delay / rate is operating system)
22:31:00sam686yes
22:32:00sam686and, i think i fix the fullscreen releases all buttons problem
22:32:00raptorwith just that one comment out?
22:32:00sam686a simple take away "SDL_ResetKeyboard();" can fix that, yes
22:32:00raptor/SDL_ResetKeyboard();
22:32:00raptorinteresting
22:43:00Watusimotomeaiining all have the same bug, or don't support alt-enter?
22:44:00raptormeaning I found that they implement full screen, but all have that 'bug' (input reset on screen change)
22:54:00Watusimotook, let's report the bug to the sdl devs and move on
22:56:00raptori actually think it is intended behavior
22:58:00Watusimotohow could it be intended?
23:00:00raptormakes sense to me to reset keyboard states when window loses focus - just to be on the safe side
23:00:00Watusimotowhy would the window lose focus?
23:00:00raptorah, therein lies the problem, probably...
23:01:00Watusimotoyes, I suspect so
23:01:00raptori can see how it would for traditional fullscreen
23:02:00raptorbecause it has to reinit everything
23:03:00sam686look again, my little http://208.107.52.15/bitfighter/SDL_fullscreen_switch_and_keyrepeat_patch.txt disables SDL_ResetKeyboard() only for inside the SDL_SetVideoMode function
23:03:00sam686a different function that loses focus also calls SDL_ResetKeyboard
23:04:00sam686at the bottom of SDL_active.c is another place the keyboard is reset
23:05:00raptorah, i see now
23:05:00raptorok
23:05:00raptorwell, i've spent days in the #sdl irc channel and got no response, so maybe forums/mailing list?
23:06:00sam686maybe wrong server of a channel sdl?
23:06:00raptori don't think so, the original author was idling there
23:07:00sam686ok...
23:14:00Watusimotook, well we can let this one go. it's a mystery, but there's not much we can do about it, and it's annoying but not critical
23:15:00sam686unless you want to try my modified SDL.dll http://208.107.52.15/bitfighter/SDL_fullscreen_switch_and_keyrepeat_patch.dll
23:15:00sam686just name it SDL.dll and put it in lib and exe directories
23:16:00raptoryeah we already compile our own SDL
23:16:00raptorfor windows...
23:17:00raptorbut i would test thoroughly first
23:21:00sam686maybe SDL (Simple DirectMedia Layer) is kind of going into CDL (complicated DirectMedia Layer), as we have or had several problems with SDL...
23:23:00raptorhaha, yep
23:23:00raptormuch better for input though
23:24:00raptorkoda, you around?
23:28:00sam686do you think i should push my modified SDL.dll changes to main ZAP repository just to make Watusimoto a little more happy about alt+enter?
23:29:00raptornot yet
23:29:00raptortesting first
23:29:00raptorand we'll need the *.lib for it, too
23:34:00sam686http://208.107.52.15/bitfighter/SDL_fullscreen_switch_and_keyrepeat_patch.zip there is .lib now
23:36:00raptorwhat svn rev did you do on sdl-1.2, the latest?
23:37:00sam686c5d651a8b679 look at the top of this: http://208.107.52.15/bitfighter/SDL_fullscreen_switch_and_keyrepeat_patch.txt
23:39:00raptorah very good
23:40:00sam686Changeset: 6099 (c5d651a8b679) Hi Sam (i saw that first and i was like what? its a different person name)
23:42:00raptoryeah, sam lantinga is the original author of SDL
23:43:00sam686ok, often, it might be easy to see original author my looking at the very first commit..
23:44:00sam686"by", not "my", why do i keep misspelling?
23:45:00CrazyLinuxNerdsam686: You tell us :-)
23:45:00raptori usually do because i have an infant in my lap and i type with on hand... :)
23:45:00sam686oh and the spell checker won't see "my" as misspelled..
23:45:00raptor*one
23:46:00sam686haha, you misspell too..
23:47:00kodaraptor: hey
23:47:00raptorhi koda
23:47:00raptordo you happen to know a workaround for SDL key up/down states being reset when you use SDL_SetVideoMode?
23:48:00kodano but i'd mail the sdl mailing list right away
23:48:00raptoris that the most active communication medium used for SDL?
23:48:00kodayes
23:48:00raptorok, thanks
23:56:00raptorso TNL abstracts its own threading by using the system provided ones
23:56:00raptorso you may have to write PSP specific functions

Index Search ←Prev date Next date→

These logs were automatically created by BFLogBot on irc.freenode.net.