Skip to content

Commit

Permalink
Bugfixes, improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
Dadido3 committed Jul 18, 2017
1 parent e0bd8c4 commit 9173a95
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 18 deletions.
8 changes: 4 additions & 4 deletions Includes/Templates.pbi
Original file line number Diff line number Diff line change
Expand Up @@ -996,7 +996,7 @@ Module Templates

; #### Draw templates
If Main::Userdata\Timestamp_Next_Pixel + 0 < Main::Get_Timestamp() And Timer_Draw < ElapsedMilliseconds()
Timer_Draw = ElapsedMilliseconds() + 20000
Timer_Draw = ElapsedMilliseconds() + 4000
ForEach Object()
If Object()\Settings\Active
Select Draw(Object())
Expand All @@ -1009,7 +1009,7 @@ Module Templates
Next
EndIf

; #### Safe templates every 10 seconds
; #### Save templates every 10 seconds
If Timer_Settings < ElapsedMilliseconds()
Timer_Settings = ElapsedMilliseconds() + 10000
Settings_Save(Main::Main\Path_AppData + Main::#Filename_Templates)
Expand All @@ -1031,8 +1031,8 @@ Module Templates
EndModule

; IDE Options = PureBasic 5.60 beta 6 (Windows - x64)
; CursorPosition = 1013
; FirstLine = 979
; CursorPosition = 998
; FirstLine = 960
; Folding = ------
; EnableXP
; Executable = ..\Pixelcanvas Client.exe
Expand Down
20 changes: 14 additions & 6 deletions Pixelcanvas Client.pb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ DeclareModule Main
; ################################################### Prototypes ##################################################

; ################################################### Constants ###################################################
#Version = 0953
#Version = 0954

#Software_Name = "Pixelcanvas.io Custom Client"

Expand Down Expand Up @@ -1152,10 +1152,19 @@ Module Main

Protected User_agent.s = "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:53.0) Gecko/20100101 Firefox/53.0"
Protected Open_handle = InternetOpen_(User_agent, 1, "", "", 0)
InternetSetOption_(Open_handle, 2, Timeout, 4)
InternetSetOption_(Open_handle, #INTERNET_OPTION_CONNECT_TIMEOUT, @Timeout, 4)
InternetSetOption_(Open_handle, #INTERNET_OPTION_RECEIVE_TIMEOUT, @Timeout, 4)
InternetSetOption_(Open_handle, #INTERNET_OPTION_DATA_SEND_TIMEOUT, @Timeout, 4)
InternetSetOption_(Open_handle, #INTERNET_OPTION_SEND_TIMEOUT, @Timeout, 4)
Protected Flags.l = #INTERNET_FLAG_KEEP_CONNECTION
Protected Connect_handle = InternetConnect_(Open_handle, Servername, Port, #Null$, #Null$, 3, 0, 0)

If Not Connect_handle
InternetCloseHandle_(Open_handle)
FreeMemory(*Temp_Data)
ProcedureReturn ""
EndIf

rgpszAcceptTypes(0) = "*/*"
rgpszAcceptTypes(1) = #Null$

Expand Down Expand Up @@ -1256,7 +1265,7 @@ Module Main
If GetJSONMember(GetJSONElement(GetJSONMember(JSONValue(JSON), "errors"), 0), "msg")
Error = GetJSONString(GetJSONMember(GetJSONElement(GetJSONMember(JSONValue(JSON), "errors"), 0), "msg"))
Select Error
Case "You are using a proxy!!!11!"
Case "You are using a proxy!!!11!one"
Userdata\Logged_In = #False ; Cause a re-login
Case "You must provide a token"
Userdata\Timestamp_Next_Pixel = Get_Timestamp() + 1000 * 60
Expand Down Expand Up @@ -1514,9 +1523,8 @@ Module Main
EndDataSection

EndModule
; IDE Options = PureBasic 5.60 (Windows - x64)
; CursorPosition = 1237
; FirstLine = 1205
; IDE Options = PureBasic 5.60 beta 6 (Windows - x64)
; CursorPosition = 22
; Folding = -----
; EnableThread
; EnableXP
Expand Down
16 changes: 8 additions & 8 deletions Pixelcanvas.io Custom Client.pbp
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>

<project xmlns="http://www.purebasic.com/namespace" version="1.0" creator="PureBasic 5.60 (Windows - x64)">
<project xmlns="http://www.purebasic.com/namespace" version="1.0" creator="PureBasic 5.60 beta 6 (Windows - x64)">
<section name="config">
<options closefiles="1" openmode="0" name="Pixelcanvas.io Custom Client"/>
</section>
<section name="data">
<explorer view="" pattern="0"/>
<log show="1"/>
<lastopen date="2017-07-18 14:09" user="David Vogel" host="DAVIDS_NOTEBOOK"/>
<lastopen date="2017-07-19 00:05" user="David Vogel" host="DAVIDS"/>
</section>
<section name="files">
<file name="Includes\About.pbi">
Expand All @@ -28,27 +28,27 @@
</file>
<file name="Includes\Templates.pbi">
<config load="0" scan="1" panel="1" warn="1" lastopen="1" panelstate="++"/>
<fingerprint md5="60820d9f5e6ec11f990fe31710106c49"/>
<fingerprint md5="a2dac144cf1747e9efb7fafbdb6cf5bb"/>
</file>
<file name="Includes\Websocket_Client.pbi">
<config load="0" scan="1" panel="1" warn="1" lastopen="0" panelstate="++"/>
<fingerprint md5="b332f6c29fbd1f51864c2bdea06cb3f9"/>
</file>
<file name="Pixelcanvas Client.pb">
<config load="0" scan="1" panel="1" warn="1" lastopen="1" panelstate="+"/>
<fingerprint md5="96723a0d658bf33b9ec55539a1a2a42f"/>
<fingerprint md5="d43bd0033e0375bd5d89b8eff6afed6b"/>
</file>
</section>
<section name="targets">
<target name="Windows x86" enabled="1" default="1">
<inputfile value="Pixelcanvas Client.pb"/>
<outputfile value="Distribution\Windows x86\Pixelcanvas Client.exe"/>
<compiler version="PureBasic 5.60 Beta 4 (Windows - x86)"/>
<compiler version="PureBasic 5.60 beta 6 (Windows - x86)"/>
<executable value="Distribution\Windows x86\Pixelcanvas Client.exe"/>
<directory value="Distribution\Windows x86\"/>
<options thread="1" xpskin="1" onerror="1"/>
<compilecount enable="1" value="542"/>
<buildcount enable="1" value="81"/>
<options xpskin="1" onerror="1" debug="1"/>
<compilecount enable="1" value="545"/>
<buildcount enable="1" value="82"/>
</target>
</section>
</project>

0 comments on commit 9173a95

Please sign in to comment.