@@ -117,7 +117,7 @@ HomebrewLaunchWindow::HomebrewLaunchWindow(homebrewButton & thisButton)
117117 loadBtn.setImage (&loadImg);
118118 loadBtn.setLabel (&loadBtnLabel);
119119 loadBtn.setAlignment (ALIGN_CENTER | ALIGN_MIDDLE);
120- loadBtn.setPosition (-200 , -310 );
120+ loadBtn.setPosition (-600 , -310 );
121121 loadBtn.setTrigger (&touchTrigger);
122122 loadBtn.setTrigger (&wpadTouchTrigger);
123123 loadBtn.setEffectGrow ();
@@ -136,7 +136,7 @@ HomebrewLaunchWindow::HomebrewLaunchWindow(homebrewButton & thisButton)
136136 delBtn.setEffectGrow ();
137137 delBtn.setSoundClick (buttonClickSound);
138138 delBtn.clicked .connect (this , &HomebrewLaunchWindow::OnDeleteButtonClick);
139- // append(&delBtn);
139+ append (&delBtn);
140140
141141 backImg.setScale (scaleFactor);
142142 backBtn.setSize (scaleFactor * backImg.getWidth (), scaleFactor * backImg.getHeight ());
@@ -169,7 +169,7 @@ void HomebrewLaunchWindow::OnOpenEffectFinish(GuiElement *element)
169169void HomebrewLaunchWindow::OnCloseEffectFinish (GuiElement *element)
170170{
171171 // ! remove element from draw list and push to delete queue
172- remove (element);
172+ removeE (element);
173173 AsyncDeleter::pushForDelete (element);
174174
175175 backBtn.clearState (GuiElement::STATE_DISABLED);
@@ -195,9 +195,15 @@ void HomebrewLaunchWindow::OnFileLoadFinish(GuiElement *element, const std::stri
195195
196196void HomebrewLaunchWindow::OnDeleteButtonClick (GuiButton *button, const GuiController *controller, GuiTrigger *trigger)
197197{
198- std::string path = " /apps/" +selectedButton.shortname +" /" +selectedButton.binary ;
199- std::string sdPath = " sd:/wiiu" +path;
200- rename (" sdPath" , " sd:/.Trashes/oiuwroiuewr" );
198+ std::string removePath = selectedButton.dirPath ;
199+ // if the remove path is the whole directory, stop!
200+ if (!removePath.compare (std::string (" sd:/wiiu/apps" )) || !removePath.compare (std::string (" sd:/wiiu/apps/" )))
201+ return ;
202+
203+ DirList dirList (removePath, 0 , DirList::Files | DirList::CheckSubfolders);
204+ for (int x=0 ; x<dirList.GetFilecount (); x++)
205+ remove (dirList.GetFilepath (x));
206+ rmdir (removePath.c_str ());
201207}
202208
203209void HomebrewLaunchWindow::OnLoadButtonClick (GuiButton *button, const GuiController *controller, GuiTrigger *trigger)
@@ -209,9 +215,10 @@ void HomebrewLaunchWindow::OnLoadButtonClick(GuiButton *button, const GuiControl
209215 std::string path = " /apps/" +selectedButton.shortname ;
210216 std::string sdPath = " sd:/wiiu" +path;
211217 CreateSubfolder (sdPath.c_str ());
212- FileDownloader::getFile (" http://wiiubru.com/appstore" +path+" /" +selectedButton.binary , sdPath+" /" +selectedButton.binary , 0 );
213- FileDownloader::getFile (" http://wiiubru.com/appstore" +path+" /meta.xml" , sdPath+" /meta.xml" , 0 );
214- FileDownloader::getFile (" http://wiiubru.com/appstore" +path+" /icon.png" , sdPath+" /icon.png" , 0 );
218+ std::string repoUrl = " http://192.168.1.104:8000" ;
219+ FileDownloader::getFile (repoUrl+path+" /" +selectedButton.binary , sdPath+" /" +selectedButton.binary , 0 );
220+ FileDownloader::getFile (repoUrl+path+" /meta.xml" , sdPath+" /meta.xml" , 0 );
221+ FileDownloader::getFile (repoUrl+path+" /icon.png" , sdPath+" /icon.png" , 0 );
215222
216223
217224// struct SYSBrowserArgsIn args = {};
0 commit comments