View unanswered posts | View active topics It is currently June 29th, 2017, 8:14 am



Welcome
Welcome to WADder

You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access many other special features. In addition, registered members also see less advertisements. Registration is fast, simple, and absolutely free, so please, join our community today!


Reply to topic  [ 33 posts ]  Go to page Previous  1, 2, 3, 4  Next
 Black screen error in custom channels (code dump on exit) 
Author Message
Site Admin
User avatar

Joined: March 13th, 2010, 11:57 am
Posts: 457
Has thanked: 29 time
Have thanks: 72 time
Post Re: Black screen error in custom channels (code dump on exit)
Post a request on the wiibrew talk page for wiivnc, it'll be an easy fix for the author with no down side. If you're lucky you'll get it in the next version.

_________________
. This signature is loading. Please wait.
Image


April 15th, 2010, 2:27 am
Report this post
Profile

Joined: March 26th, 2010, 9:12 pm
Posts: 19
Location: Brazil, No, it's not in Africa.
Has thanked: 0 time
Have thanks: 1 time
Post Re: Black screen error in custom channels (code dump on exit)
nice idea thanks


April 15th, 2010, 2:56 am
Report this post
Profile
Site Admin
User avatar

Joined: March 14th, 2010, 5:16 pm
Posts: 96
Location: Berlin, Germany
Has thanked: 3 time
Have thanks: 21 time
Post Re: Black screen error in custom channels (code dump on exit)
you're just missing zlib..
can be found here: http://sourceforge.net/projects/devkitp ... s/portlibs

download the ppc version.

Edit: Compiles fine for me (with zlib of course).. Also added exit(0) here:

Code:
      //Actually change the screen when nothing is visible
      if((fadeTo != NULL || fadeToExit) && fadeOpacity == 255) {
         if(fadeToExit) {
            exit(0); //<---------
            return 0;
         }


Haven't tested it, but here's my dol


Attachments:
wiivnc.dol [1.59 MiB]
Downloaded 47 times
April 15th, 2010, 3:52 pm
Report this post
Profile

Joined: March 26th, 2010, 9:12 pm
Posts: 19
Location: Brazil, No, it's not in Africa.
Has thanked: 0 time
Have thanks: 1 time
Post Re: Black screen error in custom channels (code dump on exit)
see leathl after i downloaded zlib
i unrared and put it in the C:\devkitpro\devkitPPC directory
then i tried again and got this error:

Code:
> "make"
linking ... wiivnc.elf
c:/devkitpro/devkitppc/bin/../lib/gcc/powerpc-eabi/4.4.3/../../../../powerpc-eabi/bin/ld.exe: cannot find -lfreetype
collect2: ld returned 1 exit status
make[1]: *** [/c/wiivnc/wiivnc.elf] Error 1
"make": *** [build] Error 2

> Process Exit Code: 2
> Time Taken: 00:00


what do you think about it?


April 15th, 2010, 6:10 pm
Report this post
Profile
Site Admin
User avatar

Joined: March 14th, 2010, 5:16 pm
Posts: 96
Location: Berlin, Germany
Has thanked: 3 time
Have thanks: 21 time
Post Re: Black screen error in custom channels (code dump on exit)
freetype library is missing, it's on the same site.


April 15th, 2010, 7:23 pm
Report this post
Profile

Joined: March 26th, 2010, 9:12 pm
Posts: 19
Location: Brazil, No, it's not in Africa.
Has thanked: 0 time
Have thanks: 1 time
Post Re: Black screen error in custom channels (code dump on exit)
leathl i did the same, downloaded the file (ppc) then extracted it in the devkitppc folder
then tried again, and i get this error:

Code:
> "make"
linking ... wiivnc.elf
c:/devkitpro/devkitppc/bin/../lib/gcc/powerpc-eabi/4.4.3/../../../../powerpc-eabi/bin/ld.exe: cannot find -lfreetype
collect2: ld returned 1 exit status
make[1]: *** [/c/wiivnc/wiivnc.elf] Error 1
"make": *** [build] Error 2

> Process Exit Code: 2
> Time Taken: 00:01


am i putting the libs in the right place? or am i missing something?

edit: i downloaded source again, then edited the main.cpp file again and then did everything like the video wilsoff posted again and then got this:
Code:
> "make"
button.cpp
checkbox.cpp
common.cpp
controller.cpp
freetype.cpp
gx.cpp
keyboard.cpp
language.cpp
main.cpp
In file included from c:/wiivnc/include/rfb/rfbclient.h:34,
                 from c:/wiivnc/source/main.cpp:9:
c:/wiivnc/include/rfb/rfbproto.h:64:18: warning: zlib.h: No such file or directory
In file included from c:/wiivnc/source/main.cpp:9:
c:/wiivnc/include/rfb/rfbclient.h:174: error: 'z_stream' does not name a type
c:/wiivnc/include/rfb/rfbclient.h:189: error: 'z_stream' does not name a type
c:/wiivnc/source/main.cpp: In function 'int main(int, char**)':
c:/wiivnc/source/main.cpp:107: error: expected '}' at end of input
c:/wiivnc/source/main.cpp:107: error: expected '}' at end of input
c:/wiivnc/source/main.cpp:107: error: expected '}' at end of input
make[1]: *** [main.o] Error 1
"make": *** [build] Error 2

> Process Exit Code: 2
> Time Taken: 00:11


April 15th, 2010, 9:58 pm
Report this post
Profile
Site Admin
User avatar

Joined: March 14th, 2010, 5:16 pm
Posts: 96
Location: Berlin, Germany
Has thanked: 3 time
Have thanks: 21 time
Post Re: Black screen error in custom channels (code dump on exit)
If I remember correct, the zip files of the libs contain two folder, "include" and "lib", am I right?
If so, you gotta extract them into <devkitPro>\libogc


April 15th, 2010, 11:31 pm
Report this post
Profile

Joined: March 26th, 2010, 9:12 pm
Posts: 19
Location: Brazil, No, it's not in Africa.
Has thanked: 0 time
Have thanks: 1 time
Post Re: Black screen error in custom channels (code dump on exit)
ok now i got all the libs ready and when i tried to compile (DIDNT GET AN LIB ERROR! YAY!) i got this error from the lines i got from u leathl:
Code:
> "make"
button.cpp
checkbox.cpp
common.cpp
controller.cpp
freetype.cpp
gx.cpp
keyboard.cpp
language.cpp
main.cpp
c:/wiivnc/source/main.cpp: In function 'int main(int, char**)':
c:/wiivnc/source/main.cpp:107: error: expected '}' at end of input
c:/wiivnc/source/main.cpp:107: error: expected '}' at end of input
c:/wiivnc/source/main.cpp:107: error: expected '}' at end of input
make[1]: *** [main.o] Error 1
"make": *** [build] Error 2

> Process Exit Code: 2
> Time Taken: 00:07


oh and for my entire main.cpp file:
Code:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <malloc.h>
#include <gccore.h>
#include <wiiuse/wpad.h>
#include <ogcsys.h>

#include <rfb/rfbclient.h>
#include "gx.h"
#include "viewer.h"
#include "controller.h"
#include "keyboard.h"
#include "mainscreen.h"
#include "language.h"

static Screen *currentScreen = NULL;

static int fadeOpacity = 255;
static u8 fadeToExit = 0;
static bool firstFade = true;
static Screen *fadeTo = NULL;

void WiiResetPressed() { fadeToExit = SYS_RETURNTOMENU; }
void WiiPowerPressed() { fadeToExit = SYS_POWEROFF_STANDBY;}
void WiimotePowerPressed(s32 chan) { fadeToExit = SYS_POWEROFF_STANDBY; }

bool Fading()
{
   return fadeOpacity > 0;
}

void FadeToScreen(Screen *screen)
{
   if(fadeTo != NULL)
      delete fadeTo;
   
   fadeTo = screen;
}

void FadeToExit()
{
   fadeToExit = SYS_SHUTDOWN;
}

void FadeToRestart()
{
   fadeToExit = SYS_HOTRESET;
}

#define FADEOUT_SPEED 10
#define FADEIN_SPEED 10

int main(int argc, char **argv) {
   
   InitializeLanguage();
   
   //Initialize graphics
   GX_Initialize();
   GX_InitFreetype();   

   //Initialize controls
   Controller::instance();
   
   //Initialize hardware buttons
   SYS_SetResetCallback(WiiResetPressed);
   SYS_SetPowerCallback(WiiPowerPressed);
   WPAD_SetPowerButtonCallback(WiimotePowerPressed);

   currentScreen = new MainScreen();
   Controller::instance()->SetListener(currentScreen);
   
   //Main loop
   while(1) {
   
      Controller::instance()->Update();      

      currentScreen->Update();
      currentScreen->Draw();
      

      //Do the fade between screens
      if((fadeTo != NULL || fadeToExit) && fadeOpacity < 255) fadeOpacity += FADEOUT_SPEED; //fade out
      if(fadeTo == NULL && !fadeToExit && fadeOpacity > 0) fadeOpacity -= FADEIN_SPEED; //fade in
      if(fadeOpacity < 0) { fadeOpacity = 0; firstFade = false; }
      if(fadeOpacity > 255) fadeOpacity = 255;
      
   
      if(fadeToExit || firstFade)
         Controller::instance()->Draw();

      if(fadeOpacity > 0) {
         GX_DrawRectangle(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, fadeOpacity);
      }
      
      if(!fadeToExit && !firstFade)
         Controller::instance()->Draw();
   
      GX_Render();
      
      
      //Actually change the screen when nothing is visible
      if((fadeTo != NULL || fadeToExit) && fadeOpacity == 255) {
         if(fadeToExit) {
            exit(0); //<---------
            return 0;
         }


April 16th, 2010, 2:36 am
Report this post
Profile
Site Admin
User avatar

Joined: March 14th, 2010, 5:16 pm
Posts: 96
Location: Berlin, Germany
Has thanked: 3 time
Have thanks: 21 time
Post Re: Black screen error in custom channels (code dump on exit)
You're missing the rest of the main.cpp
You cut the rest :D

Put it back in and it'll work.


April 16th, 2010, 3:26 am
Report this post
Profile

Joined: March 26th, 2010, 9:12 pm
Posts: 19
Location: Brazil, No, it's not in Africa.
Has thanked: 0 time
Have thanks: 1 time
Post Re: Black screen error in custom channels (code dump on exit)
is this what you mean leathl?
Code:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <malloc.h>
#include <gccore.h>
#include <wiiuse/wpad.h>
#include <ogcsys.h>

#include <rfb/rfbclient.h>
#include "gx.h"
#include "viewer.h"
#include "controller.h"
#include "keyboard.h"
#include "mainscreen.h"
#include "language.h"

static Screen *currentScreen = NULL;

static int fadeOpacity = 255;
static u8 fadeToExit = 0;
static bool firstFade = true;
static Screen *fadeTo = NULL;

void WiiResetPressed() { fadeToExit = SYS_RETURNTOMENU; }
void WiiPowerPressed() { fadeToExit = SYS_POWEROFF_STANDBY;}
void WiimotePowerPressed(s32 chan) { fadeToExit = SYS_POWEROFF_STANDBY; }

bool Fading()
{
   return fadeOpacity > 0;
}

void FadeToScreen(Screen *screen)
{
   if(fadeTo != NULL)
      delete fadeTo;
   
   fadeTo = screen;
}

void FadeToExit()
{
   fadeToExit = SYS_SHUTDOWN;
}

void FadeToRestart()
{
   fadeToExit = SYS_HOTRESET;
}

#define FADEOUT_SPEED 10
#define FADEIN_SPEED 10

int main(int argc, char **argv) {
   
   InitializeLanguage();
   
   //Initialize graphics
   GX_Initialize();
   GX_InitFreetype();   

   //Initialize controls
   Controller::instance();
   
   //Initialize hardware buttons
   SYS_SetResetCallback(WiiResetPressed);
   SYS_SetPowerCallback(WiiPowerPressed);
   WPAD_SetPowerButtonCallback(WiimotePowerPressed);

   currentScreen = new MainScreen();
   Controller::instance()->SetListener(currentScreen);
   
   //Main loop
   while(1) {
   
      Controller::instance()->Update();      

      currentScreen->Update();
      currentScreen->Draw();
      

      //Do the fade between screens
      if((fadeTo != NULL || fadeToExit) && fadeOpacity < 255) fadeOpacity += FADEOUT_SPEED; //fade out
      if(fadeTo == NULL && !fadeToExit && fadeOpacity > 0) fadeOpacity -= FADEIN_SPEED; //fade in
      if(fadeOpacity < 0) { fadeOpacity = 0; firstFade = false; }
      if(fadeOpacity > 255) fadeOpacity = 255;
      
   
      if(fadeToExit || firstFade)
         Controller::instance()->Draw();

      if(fadeOpacity > 0) {
         GX_DrawRectangle(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, fadeOpacity);
      }
      
      if(!fadeToExit && !firstFade)
         Controller::instance()->Draw();
   
      GX_Render();
      
      
      //Actually change the screen when nothing is visible
      if((fadeTo != NULL || fadeToExit) && fadeOpacity == 255) {
         if(fadeToExit) {
            SYS_ResetSystem(fadeToExit, 0, 0);
            return 0;
         }
         
         if(currentScreen != NULL)
            delete currentScreen;
         
         currentScreen = fadeTo;
         Controller::instance()->SetListener(currentScreen);
         fadeTo = NULL;
      }
   }
   return 0;
}
      //Actually change the screen when nothing is visible
      if((fadeTo != NULL || fadeToExit) && fadeOpacity == 255) {
         if(fadeToExit) {
            exit(0); //<---------
            return 0;
         }


but after that i got this error:
Code:
> "make"
main.cpp
c:/wiivnc/source/main.cpp:120: error: expected unqualified-id before 'if'
make[1]: *** [main.o] Error 1
"make": *** [build] Error 2

> Process Exit Code: 2
> Time Taken: 00:05


and when i click the purple line it takes me to this line:
if((fadeTo != NULL || fadeToExit) && fadeOpacity == 255) {
the last of these and as im NOOOOOOOOOOOOOOOOOOoo coder + noobie idk whatodo :)


April 16th, 2010, 3:43 am
Report this post
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 33 posts ]  Go to page Previous  1, 2, 3, 4  Next

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Donate Now
Donate Now


Hosted by © 2017 FreeForums.org | Create a free forum | Powered by phpBB
About FreeForums | Legal | Advertise Here | Investors | Contact FreeForums.org
suspicion-preferred