The preceding for loop exits and leaves i=-1. I think the invalid assumption
is that nmodes>1, which in my case is false, so the break statement is never
reached.
I wonder if the same error condition could occur if every mode is too small
for the requested window size, in which case best_width=0 always and again
the loop will exit with i=-1.
In either case adding
if (i<=0) i=0;
just before the match: label will select the largest (or only) resolution.
This has (sort-of) fixed it here, although it now seems to be very confused
about Xinerama. Without Xinerama, it’s fine.
Adding a check for i<0 is part of it, I’m wondering if the for loop
should, in addition, run while i >= 0 instead of i > 0…haven’t had my
morning coffee yet, though. Anyone?
Adding a check for i<0 is part of it, I’m wondering if the for loop
should, in addition, run while i >= 0 instead of i > 0…haven’t had my
morning coffee yet, though. Anyone?
Adding a check for i<0 is part of it, I’m wondering if the for loop
should, in addition, run while i >= 0 instead of i > 0…haven’t had my
morning coffee yet, though. Anyone?
The loop does run while i>=0, at least in the source of the 1.2.6 release:
for ( i = nmodes-1; i >= 0 ; i-- ) {
Which should be;
for ( i = nmodes-1; i > 0 ; i-- ) {
I have now convinced myself that this bug will manifest itself in the
following two cases:
(i) if you ask for a fullscreen window which is either wider or taller than
any supported resolution.
(ii) if you ask for a fullscreen window and only have one resolution
configured.
Spotted at the end of August for option two. This is already fixed in
CVS from my mistake while fixing X4.3 support. For some reason I’d
chucked in the equals while moving code about.On Thu, 2003-12-11 at 15:48, Dave Turner wrote:
On Thursday 11 Dec 2003 2:33 pm, Ryan C. Gordon wrote:
Hi!
Actually it looks like the typicall error if the sdl-lib is not found. on the
otherside you are linking to sdl. did you try compiling using sdl-conifg
–cflags --libs ?
regards
MatthiasAm Donnerstag, 11. Dezember 2003 21:15 schrieb Jonas Hartmann:
possibly a “make” not a “SDL” problem, but i cant get further here…
i guess its some stupid thing i cannot know being a newbie again,
any idea on which list i should ask things like that?
Make Output:
make -k clean all
rm: cannot remove test.exe': No such file or directory make: *** [clean] Error 1 rm main.o test.exe g++ -c -g main.cpp g++ -L/SDL -g -o -lmingw32 -lSDLmain -lSDL main.o main.o(.text+0x88): In functionZ8SDL_mainv’:
D:/Applications/Eclipse/workspace/SDL_Learn/main.cpp:9: undefined
reference to SDL_Init' main.o(.text+0x9b):D:/Applications/Eclipse/workspace/SDL_Learn/main.cpp:10: undefined reference toSDL_GetError’
main.o(.text+0xd1):D:/Applications/Eclipse/workspace/SDL_Learn/main.cpp:19:
undefined reference to SDL_Quit' D:/Applications/MSYS/mingw/bin/../lib/gcc-lib/mingw32/3.2.3/../../../libmin gw32.a(main.o)(.text+0x97):main.c: undefined reference toWinMain at 16’
make: *** [test.exe] Error 1
make: Target `all’ not remade because of errors.
Right-ho - I looked too briefly at the mailing list archives. Ta.
DaveOn Thursday 11 Dec 2003 7:48 pm, Alan Swanson wrote:
On Thu, 2003-12-11 at 15:48, Dave Turner wrote:
for ( i = nmodes-1; i >= 0 ; i-- ) {
Which should be;
for ( i = nmodes-1; i > 0 ; i-- ) {
Spotted at the end of August for option two. This is already fixed in
CVS from my mistake while fixing X4.3 support. For some reason I’d
chucked in the equals while moving code about.