printf output and SDL
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    tolkien
    Posts: 544 from 2013/5/29
    Hi friends.

    Im doing some stuff with SDL and know that printf() is "disabled" under SDL. Well, normally Its redirected to some files.

    If I write freopen("con:", "w", stdout); after SDL_Init() I can see a shell window opening and close quickly. I guess all printf() stuff is there but I cant see it.

    My question is how can I see the result or stay the con: open?
    MorphOS: PowerMac G5 - PowerBook G4 - MacMini.
    Classic: Amiga 1200/060 - A500 PiStorm
  • »14.10.13 - 17:24
    Profile
  • Paladin of the Pegasos
    Paladin of the Pegasos
    Intuition
    Posts: 1113 from 2013/5/24
    From: Nederland
    I have no experience with SDL but can you not use Printf() from dos.library?
    1.67GHz 15" PowerBook G4, 1GB RAM, 128MB Radeon 9700M Pro, 64GB SSD, MorphOS 3.15

    2.7GHz DP G5, 4GB RAM, 512MB Radeon X1950 Pro, 500GB SSHD, MorphOS 3.9
  • »14.10.13 - 18:03
    Profile
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    tolkien
    Posts: 544 from 2013/5/29
    mmmmm...good question!!! hehehehe Im under a PC now but will try in a few minutes!
    Thanks for the tip Intuition!!
    MorphOS: PowerMac G5 - PowerBook G4 - MacMini.
    Classic: Amiga 1200/060 - A500 PiStorm
  • »14.10.13 - 18:12
    Profile
  • MDW
  • Order of the Butterfly
    Order of the Butterfly
    MDW
    Posts: 479 from 2003/7/26
    From: Wroclaw/Poland
    It strange. I am using SDL to creating my multiplatform crappy applications. Result of printf() function is visible on CLI which is opened when I run the application.
  • »14.10.13 - 19:04
    Profile Visit Website
  • Paladin of the Pegasos
    Paladin of the Pegasos
    Intuition
    Posts: 1113 from 2013/5/24
    From: Nederland
    Quote:

    tolkien wrote:
    mmmmm...good question!!! hehehehe Im under a PC now but will try in a few minutes!
    Thanks for the tip Intuition!!



    You're welcome. Hope it works. :)
    1.67GHz 15" PowerBook G4, 1GB RAM, 128MB Radeon 9700M Pro, 64GB SSD, MorphOS 3.15

    2.7GHz DP G5, 4GB RAM, 512MB Radeon X1950 Pro, 500GB SSHD, MorphOS 3.9
  • »14.10.13 - 19:24
    Profile
  • MorphOS Developer
    itix
    Posts: 1520 from 2003/2/24
    From: Finland
    SDL libraries dont prevent using printf(). There are restrictions in the library code itself but you can continue using standard c library stuff.
    1 + 1 = 3 with very large values of 1
  • »14.10.13 - 19:37
    Profile
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    tolkien
    Posts: 544 from 2013/5/29
    But i have a fresh install and Im unable to see any result using printf(). Perhaps Im doing something wrong. Ill try later but thanks for answer!
    MorphOS: PowerMac G5 - PowerBook G4 - MacMini.
    Classic: Amiga 1200/060 - A500 PiStorm
  • »14.10.13 - 19:59
    Profile