void Speedtest_Init(App_t *app) { memset(&self, 0, sizeof(self)); if(app != NULL) { self.app = app; self.speedrd = APP_GET_WIDGET("speedr_text"); self.speedwr = APP_GET_WIDGET("speedw_text"); self.status = APP_GET_WIDGET("status_text"); self.cd_c = APP_GET_WIDGET("/cd"); self.sd_c = APP_GET_WIDGET("/sd"); self.hdd_c = APP_GET_WIDGET("/ide"); self.pc_c = APP_GET_WIDGET("/pc"); if(!DirExists("/pc")) GUI_WidgetSetEnabled(self.pc_c, 0); if(!DirExists("/sd")) GUI_WidgetSetEnabled(self.sd_c, 0); if(is_custom_bios()/*!DirExists("/cd")*/) { GUI_WidgetSetEnabled(self.cd_c, 0); } if(!DirExists("/ide")) GUI_WidgetSetEnabled(self.hdd_c, 0); } else { ds_printf("DS_ERROR: %s: Attempting to call %s is not by the app initiate.\n", lib_get_name(), __func__); } }
// HANDLERS void BiosFlasher_ActivateScrollButtons(int currScrollPos, int maxScroll) { GUI_WidgetSetEnabled(BiosFlasher_GetWidget("btn_scroll_left"), 0); GUI_WidgetSetEnabled(BiosFlasher_GetWidget("btn_scroll_right"), 0); if (currScrollPos > 0) { GUI_WidgetSetEnabled(BiosFlasher_GetWidget("btn_scroll_left"), 1); } if (currScrollPos < maxScroll) { GUI_WidgetSetEnabled(BiosFlasher_GetWidget("btn_scroll_right"), 1); } }
void gd_ripper_Init(App_t *app, const char* fileName) { if(app != NULL) { memset(&self, 0, sizeof(self)); self.app = app; self.bad = APP_GET_WIDGET("bad_btn"); self.gname = APP_GET_WIDGET("gname-text"); self.pbar = APP_GET_WIDGET("progress_bar"); self.sd_c = APP_GET_WIDGET("sd_c"); self.hdd_c = APP_GET_WIDGET("hdd_c"); self.net_c = APP_GET_WIDGET("net_c"); self.track_label = APP_GET_WIDGET("track-label"); self.read_error = APP_GET_WIDGET("read_error"); self.num_read = APP_GET_WIDGET("num-read"); if(!DirExists("/pc")) GUI_WidgetSetEnabled(self.net_c, 0); else GUI_WidgetSetState(self.net_c, 1); if(!DirExists("/sd")) GUI_WidgetSetEnabled(self.sd_c, 0); else { GUI_WidgetSetState(self.net_c, 0); GUI_WidgetSetState(self.sd_c, 1); } if(!DirExists("/ide")) GUI_WidgetSetEnabled(self.hdd_c, 0); else { GUI_WidgetSetState(self.sd_c, 0); GUI_WidgetSetState(self.net_c, 0); GUI_WidgetSetState(self.hdd_c, 1); } gd_ripper_ipbin_name(); } else { ds_printf("DS_ERROR: %s: Attempting to call %s is not by the app initiate.\n", lib_get_name(), __func__); } }