Fix refactored code on linux.
Merge pull request #1 from metajack/refactor-gfx

Fix refactored code on linux.