Jake Gyllenhaal was the victim of a serious Guy Code violation during a screening of his movie "Source Code" at SXSW -- when a guy tried to take his picture ... in the bathroom!
We're told Jake was in the restroom, doing his thing, when a guy snapped off a pic. Not cool!
Although there are rumors a fight went down, we're told Jake simply talked to the guy -- who understood his mistake -- and eventually the pic was deleted.
Guess the guy realized it was a sh*tty thing to do.