| 1 | Fromscip-debian debian qutemol 0.4.1~cvs20081111-15 qutemol/patches/`31_reset_local_for_shaders.patch`#From.: Michael Banck <[email protected]scip-debian . . . identity/`[email protected]`.> |
| 2 | Subjectscip-debian debian qutemol 0.4.1~cvs20081111-15 qutemol/patches/`31_reset_local_for_shaders.patch`#Subject.: Set locale to "C" before making shaders and reset it afterwards. |
| 3 | |
| 4 | |
| 5 | --- a/src/Common.cppscip-debian debian qutemol 0.4.1~cvs20081111-15 qutemol/upstream/`src/Common.cpp`: |
| 6 | +++ b/src/Common.cppscip-debian debian qutemol 0.4.1~cvs20081111-15 qutemol/upstream/`src/Common.cpp`: |
| 7 | @@ -4,6 +4,8 @@ |
| 8 | #include <GL/glew.h> |
| 9 | #include "CgUtil.h" |
| 10 | |
| 11 | +#include <locale.h> |
| 12 | + |
| 13 | //#include <GL/gl.h> |
| 14 | #include <math.h> |
| 15 | //#include <GL/glu.h> |
| 16 | @@ -859,7 +861,13 @@ |
| 17 | |
| 18 | void drawFrame() { |
| 19 | |
| 20 | + char* locale; |
| 21 | + locale = setlocale(LC_ALL,NULL); |
| 22 | + setlocale(LC_ALL,"C"); |
| 23 | + |
| 24 | cgSettings.MakeShaders(); |
| 25 | + |
| 26 | + setlocale(LC_ALL,locale); |
| 27 | |
| 28 | if (mol.DoingAO()) { |
| 29 | // do at least one more step per rendering |