• Print

Author Topic: When I opened QB64 GL the title was full of gl commands  (Read 88 times)

Cyperium

  • Hero Member
  • *****
  • Posts: 3336
  • Knowledge is good, but understanding is better
    • Cyperium
    • Email
When I opened QB64 GL the title was full of gl commands
« on: May 05, 2013, 06:59:20 AM »
It's not a devastating bug I guess but still something that should be looked over until it is released as a official QB64 version.


I didn't do anything special to produce the bug, and I can't reproduce it either unfortunately. Next time I started QB64 GL all was back to normal (only displaying QB64 as title).

I've attached the picture of the bug.
Venture - New Prototype, QB64 Editor v1.95b (linux compatible, if you compile the source).

Clippy

  • Hero Member
  • *****
  • Posts: 16446
  • I LOVE π = 4 * ATN(1)    Use the QB64 WIKI >>>
    • Pete's Qbasic Site
    • Email
Re: When I opened QB64 GL the title was full of gl commands
« Reply #1 on: May 05, 2013, 09:02:21 AM »
Looks like an Interpreter assigning the variable types...  ;)

Are you sure your interpreter is not involved with this?

PS: Get an account at Photobucket. I hate downloading pictures of tragedies...  ;D
QB64 WIKI: Main Page
Download Q-Basics Code Demo: Q-Basics.zip
Download QB64 BAT, IconAdder and VBS shortcuts: QB64BAT.zip
Download QB64 DLL files in a ZIP: Program64.zip

Galleon

  • Administrator
  • Hero Member
  • *****
  • Posts: 4711
  • QB Forever
    • Email
Re: When I opened QB64 GL the title was full of gl commands
« Reply #2 on: May 05, 2013, 12:59:53 PM »
QB64 GL ONLY

Just had the same question in an Email. This fix (will be permanently applied) should work:

1) Open up internal\c\libqb.cpp

2) Change the sub__title function to use this code

Code: [Select]
void sub__title(qbs *title){
if (new_error) return;
static qbs *cz=NULL;
if (!cz){cz=qbs_new(1,0); cz->chr[0]=0;}
static qbs *str;
str=window_title;
if (!str) str=qbs_new(0,0);
qbs_set(str,qbs_add(title,cz));
if (window_exists){
 #ifdef QB64_GLUT
 glutSetWindowTitle((char*)str->chr);
 #endif
}
window_title=str;
}//title

3) Go to options advanced and toggle the debug checkbox and click ok (this purges the precompiled content), do it again to revert to your original debug state

Of course, as you can't reproduce the problem, I won't expect any feedback. If it happens again let me know asap. The above fixes a potential (but unlikely) threading issue but not setting 'window_title' till it is properly set.
« Last Edit: May 05, 2013, 01:05:13 PM by Galleon »
Something old... Something new... Something borrowed... Something blue...

Cyperium

  • Hero Member
  • *****
  • Posts: 3336
  • Knowledge is good, but understanding is better
    • Cyperium
    • Email
Re: When I opened QB64 GL the title was full of gl commands
« Reply #3 on: May 05, 2013, 03:42:26 PM »
I did what you said. Let's just hope you don't get any feedback on this :)


Clippy: Yeah, the interpreter is not nearly in a state to use Gl yet :), I can use Dropbox if I like, that was just me being lazy :)
Venture - New Prototype, QB64 Editor v1.95b (linux compatible, if you compile the source).

  • Print