Jump to content

qubits

Members
  • Content Count

    105
  • Joined

  • Last visited

Everything posted by qubits

  1. Hi Keith, Using an ini file myself but in TPath.GetHomePath. don't extract or exclude anything, TPath handles that. iniPath:=TPath.Combine(TPath.GetSharedDownloadsPath, 'MyFolderName'); Then use TFile and TDirectory.. if not TDirectory.Exists(...) then TDirectory.CreateDirectory(...); TFile also has an exists method. and the ini:=TIniFile.Create(TPath.Combine(iniPath,'my.ini')); Again, using home path, I need no permissions, using shared path, might need them so check them. can't comment on barcode, sorry.. Dave
  2. Hi Keith, Yes, it would be possible to make berlin target newer androids, looked into it myself, but in my opinion, it's not the correct path. Upgrade to D11, follow steps above in Dave's response because I didn't at first, no fun. and my in experience, there's usually something that is different that causes a bit of work, I don't typically expect a perfect compile first time on a new D version. I will say this, I'm on Android 11 now. 🙂 Good Luck, Dave
  3. lol, i flip my ie ei allot.. height, client piss me off.. i turn off all editor helpers, just slow me down.. i flow it all out, then correct my spelling, with a few ctrl-f9, compilers so fast, this works..
  4. qubits

    Async dialog on android?

    kind of like this? https://github.com/qubits-us/Base3D dave
  5. qubits

    Application terminate on Android/iOS

    Dave, Wow, that's beautiful!!
  6. Hi Mark, no, compiler in my head says, 6 and 7. index passed as var, i is index, index is i and you inc it, change the order of your addition. dave
  7. qubits

    Application terminate on Android/iOS

    not sure about your apples but killed my robots like this.. {$IFDEF ANDROID} ReleaseWakeLock; MainActivity.finish; {$ENDIF} dave
  8. qubits

    iOS, Metal, Bitmaps, RGB becomes BGR?

    Hi John, First word that popped into my head was, endianness. Use to pass data between old mpus. looking at timage.LoadFromStream, it calls the TBitmapCodecManager.LoadFromStream who then passes it off to the CodecClass but that's where i stop as the function to get the correct CodecClass is in fact called GuessCodecClass() , so your guess is as good as mine.. frack it, flip all the bits.. Sorry, no help..
  9. qubits

    DPI and Scaling Discussion

    nah, read only and probably just insane thinking i can set a scaled matrix but looking some more, maybe the camera matrix or i see a scale property. not really needed as my textures and text is quite perfect now, just seeing if there is in fact a juicy center in that OpenGL tootsie pop. thanks again!
  10. qubits

    DPI and Scaling Discussion

    yes, just like that and know i also noticed, need to drop some tdummy's and replace with TSolidLayer3d which has this magical property and can also contain my kids. will definitely be playing with this, could save me allot of work, was just going to do all the math by hand, thank you!! 🙂
  11. qubits

    DPI and Scaling Discussion

    happy to say, pixel perfection has been achieved. yes, had to hand draw all text, some texture buffering. and not totally implemented, so I know what I'm doing this weekend. but pretty simple, make all bitmaps and draw all text multiplied by the current scale.
  12. qubits

    Scrollable TGridLayout question

    Tricky, mobile can be whole bunches of fun. Curious, did you try scrolling it yourself. Don't use click event, mouse down save x, mouse up check x, if it's more scroll right, if it's less scroll left. I see the Vert Scroll box has scrollby, so a bit of work, should be able to make it happen. I would also add or subtract some jitter. If x is dead on (+-jitter), then click. Have the scroll bar hidden all the time and just flick it. Good luck! dave
  13. Hi Dave. Some crazy requirements, but maybe you already have your answer. Maybe make the whole mess one image, track x,y on clicks. You could even work out a pinching and scrolling I bet. Resource consumption goes down to nada. Build your image just like your building your screen. You could have thousands of what looks like individual controls but really aren't.
  14. Change the HitTest of the timage to false, click should flow down. there's also an AutoCapture property in timage, might get you're hovering going too
  15. qubits

    DPI and Scaling Discussion

    Thanks Guys for comments. And I have had to do quite a few rewrites, already had to ditch allot of text controls, some ghost crawled into my machine. But hey, less is more sometimes. about 2 more days and I'll know. This is all in 3d, i only use rectangles and spheres. One form3d, nothing on it. apk size is at about 16mb with including 20 animated themes. been fun, coordinates, boggle my brain still, just divide by 2 and throw a gap there, idk. I do think I understand the issue. I make things based off of the width, height which on android is very small 916x411, but in reality it's 2520x1080, when it up scales i would imagine it making best choices as there's not enough pixels to fill it. And I also kind of remember that opengl liked everything to be on integers or uses a sub par rendering, which I already tried but I used 916x411 as my start, so my sizes and positions when scaled are definitely not integers, so I redo that as well just to see.
  16. qubits

    Indy Documentation Problem

    just recently updated to d11, my indy help seems to be good? not sure about examples, just started with indy myself and didn't really find anything that fit my needs. but needed a packet client for android, so this is what i did, not saying it's correct, but compiles clean under d11 and was tested and working quite well under berlin on both window and android. bit of bloat as it also has udp server discovery that can auto config client. pretty basic, 1 crit, 2 q's, 2 socks, 3 threads wrapped in a class that will shoot you an event when it gets a packet. haven't turn the key on this engine since I've installed d11, been tackling other tall issues, lol. she'll turn on. this is a custom packet, client comms, you need to define your own packets, I got a whole unit for that. Good Luck. Dave uClientCommsObj.pas
  17. qubits

    DPI and Scaling Discussion

    Now on to the text. It's also missing pixels only on android, again windows is perfect. this will a bit more work i see. text is just a control created at runtime, ttext3d. so I'm seeing it probably won't work and as I've already removed most of it, time to take it all out as I need to also scale all the text. been thinking on this for a bit, wondering if I don't just scale everything up, calculate rounded/trunc positions and heights, then scale the whole mess back down and don't trunc or round. this way, when rendered should be on integers, bet you opengl would like that. be cool if i could put a TMatrix on my scene, wouldn't have to change anything, save matrix, replace it with a scaled one, do all my work, restore the matrix, all done.
  18. qubits

    DPI and Scaling Discussion

    I make all images and controls at runtime, do store some backgrounds, but only having issues on tbitmaps I make in code. more dots per inches on the phone, my pics need more pixels. Multiplying my texture width and height by current screen scale, seemed to fix this up nicely. Windows has a scale of 1, my android tab a scale of 1 my phone a scale of 2.625 got the scale with this. function GetScreenScale: Single; var ScreenService: IFMXScreenService; begin Result := 1; if TPlatformServices.Current.SupportsPlatformService (IFMXScreenService, IInterface(ScreenService)) then Result := ScreenService.GetScreenScale; end; Thanks! Dave
  19. qubits

    DPI and Scaling Discussion

    Hi Lars, Thinking I'm noticing the effects of this. Strange sub par rendering only on noticeable on android. my android 11 phone has a screen size of 2520x1080 my app reports 916x411 with typical size settings in phone. changing phone options make everything smaller, can only get 1081X485, so not much of a difference. everything in my app is created in code. all sizes and positions are nothing more than division of height and width. Which I have either rounded/trunc to see it appeases rendering gods. now the interesting, pulled a screenshot off my phone, produced a png which was 2520x1080 72ppi noticing this I'm thinking my textures are way too small. because currently, the round rectangle, is not round, sad to say. only android, windows perfect at any res. other than that, everything is precisely sized and placed, looks really good, so I'm just being picky. So, I'm curious is this DPI and scaling playing with me? Thanks in advance, Dave
  20. qubits

    Extract string between two number delphi

    so the dots are not part of the string. do you know the length of the breaks? or a pattern to look for? seems pretty random. and where did the "14v" <- the v not in the original string..
  21. Hello Everyone, newb here, sorry.. Has something big changed since berlin? have to ask as since it's release iv'e been coding like mad. trying to move into d11 for android 11 support. berlin windows no issues, when i first ported to android blindly like a mad man. nope didn't run, no modal windows.. so re-design.. one form3d, everything is dynamically created.. this is just one piece of a larger puzzle about 60k lines. put scenes into separate classes, used class(tdummy) again windows, beautiful, first go on android.. everything piled up.. oops, ok.. free isn't free, must use disposeof so changed all my freeandnils to disposeof and nil. success, running good on cheap android 10 tab and tv box. wouldn't work on my phone though, as it was android 11, quick look, need to update. got my Delphi 11 loaded. help file was from older version. loaded my project and no, i didn't do what i had should have done. notice that after i fixed my help files. so anyways, loaded my app, loaded right up. compile, 2 errors.. screen height and width are now singles, cool, trunc. recompile, success. launch on windows, perfectly. android, memory errors. launches but no way somethings wrong mission control, abort, abort.. so i see, free and dispose are the same again or not?? i changed all my disposeof and nils to free then nil no luck. put cleanup routines on my scenes, unrolling everything. my destructors are bigger than my constructors. i will say this, when moving back to free and nil i found i had a bug. one of my scenes, i removed an object by commenting it out in the creation but had still left the dispose of in place. no problems reported with berlin/d11 on win or android using free i get access violation as expected. So,kind of curious, what happens when you disposeof something that is not created.. either way back now using CleanUp Free Nil on all my objects but still something is not right here. I'll keep at it, don't see anyone talking firemonkey3d. i use tdummy,trectangle3d,tsphere,ttext3d,timage3d and that's about it. i must have some reference still dangling. bit of an old timer if you haven't already guessed it, sorry.. love delphi, since delphi1. sorry for the rant, just needed a break.. but please, if there is some magic thing im suppose to already know, please tell me.. i saw the DisposeOfAndNil, i was like omg, that's was a long dark tunnel that led no where.. again, sorry for the long rant.. happy holidays everyone!! ~dave
  22. qubits

    When free isn't free anymore..

    sorry.. better, but no.. might not like being invisible and changing, very obscure.. same thing as first stack trace, but much better.. was crashing on most scene transitions and creations.. probably Z messing with me or something completely offtrack that causes it, always bombs trying to build a bitmap for a string.. will say this, it's faster, allot.. i know it's something im doing, made small test program to see if i could reproduce and couldn't, then it started getting big.. earth spinning, moon in orbit and a borg ship of course.. spinning the borg was a bit choppy, but i'll be getting back to all that soon..
  23. qubits

    When free isn't free anymore..

    so, hate jumping the gun.. but so far, so good.. so yes, from berlin to d11.. nil is now my enemy again.. all my scenes where created with, my use to be friend nil.. i was just setting the parent and usually after the creation.. TText3d does not appreciate this anymore too much.. causes the tall skinny to pop up and pitch you.. 🙂 still need to go through everyone a few more times, really make sure my stability is back.. funny, been watching my berlin compiled app running like a tank this whole time i've been fighting.. still have to decide, do i get lazy again and not unroll fully everything i roll and just free and nil.. or nil,nil,nil then free and and nil again.. so, saying goodbye to my dear old friend nil, you helped me with arc and i thank you for that and wish you well.. happy coding everyone!!
  24. qubits

    When free isn't free anymore..

    Still my Berlin Enterprise, no issue.. yes, it's under arc, which i had thought i had figured out. nil was my new best friend. Now, under D11 pro, kinda broke couldn't afford the enterprise as of yet, but I'm starting to think nil is killing me somehows.. FPixelFormat more than 2 billion, maybe that's the high dpi everyone is complaining about.. FHeight is really, really tall and my FWidth is 0.. really skinny.. no idea what this Pitch is, but she's pretty big too.. It can happen during creation, like this stack pic or when im refreshing a scene and just changing text.. boom the tall skinny pitch's me.. curious, if there's no width, why the 4 meg buffer.. i did see something about a scale im using ScreenCam so im at 1 not 10. really wish it would happen on windows, maybe i could step through it.. too me, it looks like i gave delphi a nil that it didn't like.
  25. qubits

    When free isn't free anymore..

    Hi, Thanks for the reply and yes, saw that, been trying a bit of everything.. getting closer i think.. looks like might be an issue with TText3d.. setting text seems to trigger a 4 meg buffer creation.. i get this same error, but could be in different area of app.. always same though, start with a TText3d text change, then boom!! Going to buy you book, looks like a good read.. thanks!! ~dave
×