|
Post by kennn on Jan 24, 2018 7:22:50 GMT -6
Hi, thank you. The code: Run: After press F1: After press F2
|
|
|
Post by n00b on Jan 24, 2018 11:59:56 GMT -6
Try Clearing the window with the CLS function after going fullscreen. Also it would help out a lot if you would upload the code with the image in the future that way I don't have to retype it. There is an option for entering code in the text options for the forum.
|
|
|
Post by n00b on Jan 24, 2018 14:03:05 GMT -6
I made some modifications to your code. Try this:
WindowOpen(0, "", 600, WINDOWPOS_CENTERED, 800, 600, 0) CanvasOpen(0, 800, 600, 0, 0, 800, 600, 0) ClearCanvas() SetColor(RGB(0, 0, 0)) RectFill(0, 0, 400, 400)
LoadImage(2, "arrow.png")
dim NewX dim NewY
Finish = 0
While Not Key(K_SPACE)
If Key(K_F1) Then SetWindowFullscreen(0, 1) Finish = 0 ElseIf Key(K_F2) Then SetWindowFullscreen(0, 0) Finish = 0 End If If Finish = 0 Then NewX = 1 NewY = 1 For a = 1 to 10 DrawImage(2, NewX, NewY) NewX = NewX + 60 NewY = NewY + 60 Next Finish = 1 End If
Update() Wend
Waitkey End
|
|
|
Post by sdlbasic on Jan 24, 2018 15:37:37 GMT -6
Where is the arrow image? I tried Linux Ubuntu and everything went well, even without the arrow image.
|
|
|
Post by n00b on Jan 24, 2018 16:25:58 GMT -6
I just made a random image to test it. The OP original example worked in Ubuntu also. When I ran it in Windows 10 the screen went to black when I went fullscreen so I changed his example so that it redraws everything in the window when you switch from window to fullscreen. So it has to be related to how switching to fullscreen works in windows. Its not a bug in RCBasic but in SDL. Its a good idea to redraw the window when switching from window to fullscreen anyway because of the different behaviors of different drivers and hardware configurations anyway. I will submit a bug report to the SDL devs but I am pretty sure they are going to tell me the same thing.
|
|
|
Post by kennn on Jan 24, 2018 19:07:49 GMT -6
Try Clearing the window with the CLS function after going fullscreen. Also it would help out a lot if you would upload the code with the image in the future that way I don't have to retype it. There is an option for entering code in the text options for the forum. Hi, this problem still exists after I add CLS: WindowOpen(0, "", 600, WindowPos_Centered, 800, 600, 0)
CanvasOpen(0, 800, 600, 0, 0, 800, 600, 0)
ClearCanvas()
SetColor(RGB(0, 0, 0))
RectFill(0, 0, 400, 400)
LoadImage(2, "arrow.png")
NewX = 1
NewY = 1
Finish = 0
while not key(K_space)
if key(K_f1) then
SetWindowFullscreen (0, 1)
CLS()
elseif key(K_F2) then
SetWindowFullscreen (0, 0)
CLS()
end if
if Finish = 0 then
for a = 1 to 10
DrawImage(2, NewX, NewY)
NewX = NewX + 60
NewY = NewY + 20
update()
next
Finish = 1
end if
update
wend
waitkey
End
|
|
|
Post by kennn on Jan 24, 2018 19:25:45 GMT -6
I made some modifications to your code. Try this: Hi, I have used the modified code from you. The problem still exists. I am using Windows. The graphic card is GT730. Perhaps this problem cannot be easily solved on Windows computer.
|
|
|
Post by kennn on Jan 24, 2018 19:31:39 GMT -6
Where is the arrow image? I tried Linux Ubuntu and everything went well, even without the arrow image. Hi, the arrow image was downloaded by me from the Internet. I downloaded some images from Internet because of learning RC BASIC!
|
|
|
Post by n00b on Jan 24, 2018 20:05:03 GMT -6
I will see if there are any tweaks I can make but I have tested this on my desktop and laptop and neither of them are doing what your computer is. I don't think this fix will get into the next version as I am already building the next release. But I will continue to work on it. Can you tell me what version of windows you are using.
|
|
|
Post by kennn on Jan 25, 2018 1:04:49 GMT -6
I will see if there are any tweaks I can make but I have tested this on my desktop and laptop and neither of them are doing what your computer is. I don't think this fix will get into the next version as I am already building the next release. But I will continue to work on it. Can you tell me what version of windows you are using. Thanks.. The computer is with Windows XP and GT730. Since you says that your windows computers are okay for your modified code, I test your modified code on another computer (Windows 10 upgraded from Windows 7 last year). The results of my original code and your modified code are the same as the results on your computers. My original code: black screen after pressing F1. Your modified code: no problem after pressing F1 or F2. Moreover, there is no flip image bug on this Windows 10 computer. Since I want to know the full screen bug which is from Windows XP or GT730, I uninstall the GT730 from the Windows XP computer. I install a G210 display card on the XP computer. The full screen bug and the flip image bug still exist. Obviously, these bugs are from Windows XP, and not from the GT730. In fact, the Windows 10 computer does not belong to me, a family member uses the Windows 10 computer for a long time each day. Mainly plays game. The hardware of my Windows XP computer is too old and not suitable for uprading to Windows 10. It means that I will need to use the Windows XP for a period of time(not upgrade to Windows 10 in this period). In fact, I have read the information on SDL BASIC's website a few weeks ago but I did not really try SDL BASIC. SDL BASIC should also use SDL. Therefore, I want to download and try the SDL BASIC. I want to know whether the flip image bug and the full screen bug will appear when I am using the SDL BASIC. I want to try first.
|
|
|
Post by n00b on Jan 25, 2018 1:18:07 GMT -6
Sdlbasic does actually work better on older hardware as it uses SDL and rcbasic uses SDL2. The difference is that sdlbasic uses software rendering and rcbasic uses hardware accelerated rendering. Also I replaced the flipImage function with the DrawImage_Flip function in the latest release. Download that and let me know if you are still having issues with the flip image. I am actually amazed that rcbasic ran on xp at all as I had not personally tested on anything lower than Windows 7.
|
|
|
Post by kennn on Jan 25, 2018 1:45:02 GMT -6
Sdlbasic does actually work better on older hardware as it uses SDL and rcbasic uses SDL2. The difference is that sdlbasic uses software rendering and rcbasic uses hardware accelerated rendering. Also I replaced the flipImage function with the DrawImage_Flip function in the latest release. Download that and let me know if you are still having issues with the flip image. I am actually amazed that rcbasic ran on xp at all as I had not personally tested on anything lower than Windows 7. SDL and SDL2.? SDLBasic uses the older version? Ok...I see. So testing SDLBASIC will become meaningless. I will not waste time to download SDLBASIC any more. Of course I will test the flipImage function when the next version is released. Learning, using or testing RC BASIC is a very nice hobby actually. RC BASIC codes are running very, very smooth inside the RC BASIC's editor on my Windows XP computer...sure! ( GT730 or G210 )
|
|
|
Post by kennn on Jan 25, 2018 3:39:33 GMT -6
Hi, n00b,
I have tested the DrawImage_Flip function in v.3.0.5. The flip image bug does not appear any more although the full screen bug still exists.
Furthermore, there is a new bug. An error Windows box appears when I am running each RC BASIC program. The descriptions inside the Windows box is:
Rcbasic_edit Error: Could not set current working directory (Error 0:......)
|
|
|
Post by n00b on Jan 25, 2018 9:11:11 GMT -6
I know what the issue is. I will get that fixed right away. I will provide a link where you can download the fixed editor so you won't have to download the whole thing again.
|
|
|
Post by kennn on Jan 26, 2018 9:56:50 GMT -6
I know what the issue is. I will get that fixed right away. I will provide a link where you can download the fixed editor so you won't have to download the whole thing again. Ok, thank you.
|
|